seperating items
-
hello, i have a cstring like this:
item1,item2,item3,item4,etc
is their a way to get each item seperated by a comma into an array (or a for loop)? i want to add each item to a listbox. (something like php's explode() function: http://us2.php.net/explode) thanks in advance
-
hello, i have a cstring like this:
item1,item2,item3,item4,etc
is their a way to get each item seperated by a comma into an array (or a for loop)? i want to add each item to a listbox. (something like php's explode() function: http://us2.php.net/explode) thanks in advance
Are you looking for
AfxExtractSubString()
?
"The largest fire starts but with the smallest spark." - David Crow
-
hello, i have a cstring like this:
item1,item2,item3,item4,etc
is their a way to get each item seperated by a comma into an array (or a for loop)? i want to add each item to a listbox. (something like php's explode() function: http://us2.php.net/explode) thanks in advance
use Tokenize()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc.](http://www.soonr.com)
-
Are you looking for
AfxExtractSubString()
?
"The largest fire starts but with the smallest spark." - David Crow
-
hello, i have a cstring like this:
item1,item2,item3,item4,etc
is their a way to get each item seperated by a comma into an array (or a for loop)? i want to add each item to a listbox. (something like php's explode() function: http://us2.php.net/explode) thanks in advance
Sam Kline wrote:
is their a way to get each item seperated by a comma into an array (or a for loop)? i want to add each item to a listbox.
see example quoted in Help of CStringT::Tokenize in MSDN!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV