← Back to LeetCode Notes

Strings

Started doing c++ string problems. I can do stuff like arrays and hashing kinda problems but never actually done cpp strings problem

10 sec read

Tokenizer with Delimiter#

C++
// First start off with 3 things// string streamstd::stringstream ss(s);  // s is the og stringstd::string    token;  // this is carrier string that the getline puts words intochar delimiter = ',';while (std::getline(ss,token,delimiter) {    // do wtv with token here}