Deepak Verma

Deepak Verma

  • Tech Writer
  • 1.7k
  • 949.5k

How to print each substring of a string ?

Mar 29 2011 1:17 AM
Suppose, we have a string str = "This is a Text Book"

Now, we need to print each substring(individually) of str as :

This
is
a
Text
Book

Please anyone write a code snippet to do so.

Answers (3)