Lines Matching refs:str
61 bool StartsWith(const std::string &str, const std::string &prefix) in StartsWith() argument
63 return ((str.size() > prefix.size()) && (str.substr(0, prefix.size()) == prefix)); in StartsWith()
66 bool EndsWith(const std::string &str, const std::string &suffix) in EndsWith() argument
68 …return ((str.size() > suffix.size()) && (str.substr(str.size() - suffix.size(), suffix.size()) == … in EndsWith()
71 std::string Trim(const std::string &str) in Trim() argument
74 size_t end = str.size() - 1; in Trim()
76 while (start < str.size()) { in Trim()
77 if (!isspace(str[start])) { in Trim()
84 if (!isspace(str[end])) { in Trim()
94 return str.substr(start, end - start + 1); in Trim()
97 std::vector<std::string> Split(const std::string &str, const std::string &pattern) in Split() argument
103 pos = str.find_first_of(pattern, start); in Split()
104 result.push_back(str.substr(start, pos - start)); in Split()