circler
asked on
Strings afterTokens in C++
Hello,
I have a function that splits a string like this:
"abc def ghij "
into tokens "abc,def,ghij" and store each token in a vector<string>...
I need another function that takes two parameters
void my_func(std::string input , vector<string>& aftertoken)
this function must split a string into tokens
but instead of storing the token it must store string after tokens
so if "abc def ghij " is the input
output must be stored in a vector like:
aftertoken[0] = " def ghij "
aftertoken[1]= " ghij "
aftertoken[2] = " "
Note: I can't use c-string/ c functions only std
I hope I can get help soon... thanks
I have a function that splits a string like this:
"abc def ghij "
into tokens "abc,def,ghij" and store each token in a vector<string>...
I need another function that takes two parameters
void my_func(std::string input , vector<string>& aftertoken)
this function must split a string into tokens
but instead of storing the token it must store string after tokens
so if "abc def ghij " is the input
output must be stored in a vector like:
aftertoken[0] = " def ghij "
aftertoken[1]= " ghij "
aftertoken[2] = " "
Note: I can't use c-string/ c functions only std
I hope I can get help soon... thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window