Skip to content

Instantly share code, notes, and snippets.

View siddhantkushwaha's full-sized avatar
🏠
Working from home

Siddhant Kushwaha siddhantkushwaha

🏠
Working from home
  • India
View GitHub Profile
@siddhantkushwaha
siddhantkushwaha / split.cpp
Created September 8, 2022 17:33
Quick C++ utility functions.
vector<string> split(const string& input, const char& ch) {
vector<string> tokens;
string token;
istringstream stream(input);
while(getline(stream, token, ch)) {
tokens.push_back(token);
}
return tokens;
}