mirror of
https://github.com/BotChain-Robots/rpc.git
synced 2026-03-09 23:12:27 +01:00
24 lines
454 B
C++
24 lines
454 B
C++
//
|
|
// Created by Johnathon Slightham on 2025-07-05.
|
|
//
|
|
|
|
#ifndef STRING_H
|
|
#define STRING_H
|
|
#include <sstream>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
inline std::vector<std::string> split(const std::string &str, const char delimiter) {
|
|
std::vector<std::string> result;
|
|
std::stringstream ss(str);
|
|
std::string token;
|
|
|
|
while (std::getline(ss, token, delimiter)) {
|
|
result.push_back(token);
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
#endif // STRING_H
|