MCPcopy Create free account
hub / github.com/Gooddbird/tinyrpc / StringUtil

Class StringUtil

tinyrpc/comm/string_util.h:10–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8namespace tinyrpc {
9
10class StringUtil {
11
12 public:
13 // split a string to map
14 // for example: str is a=1&tt=2&cc=3 split_str = '&' joiner='='
15 // get res is {"a":"1", "tt":"2", "cc", "3"}
16 static void SplitStrToMap(const std::string& str, const std::string& split_str,
17 const std::string& joiner, std::map<std::string, std::string>& res);
18
19 // split a string to vector
20 // for example: str is a=1&tt=2&cc=3 split_str = '&'
21 // get res is {"a=1", "tt=2", "cc=3"}
22 static void SplitStrToVector(const std::string& str, const std::string& split_str,
23 std::vector<std::string>& res);
24
25};
26
27
28}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected