I'm looking for a simple way to tokenize std::string
input without using non default libraries such as Boost, etc.
For example, if the user enters forty_five, I would like to separate 'forty' and 'five' using the '_' as the delimiter.
c++splitstdstringtokenize
I'm looking for a simple way to tokenize std::string
input without using non default libraries such as Boost, etc.
For example, if the user enters forty_five, I would like to separate 'forty' and 'five' using the '_' as the delimiter.
Best Answer
To convert a string to a vector of tokens (thread safe):