[try Beta version]
Not logged in

 
Breaking up a string

Mar 12, 2009 at 6:55pm
Hi I need a simple way to break up one string into several strings. An example of what i need is to turn the string "golf" into four different strings, "g", "o", "l", "f".
If anyone knows how to do this it would be greatly appreciated.
Mar 12, 2009 at 7:04pm
Given

string foo = "Hello World"

or

char foo[] = "Hello World"

foo[0] returns the 0th character in the word.
Loop until foo.length() - 1 (string case) or strlen( foo ) (char* case)

Topic archived. No new replies allowed.