|
|
@@ -52,7 +52,7 @@ class GE_FUNC_VISIBILITY StringUtils { |
|
|
|
return s; |
|
|
|
} |
|
|
|
// lint -esym(551,*) |
|
|
|
static std::string &Rtrim(std::string &s) { /*lint !e618*/ |
|
|
|
static std::string &Rtrim(std::string &s) { /*lint !e618*/ |
|
|
|
#if __cplusplus >= 201103L |
|
|
|
(void)s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) { return !std::isspace(c); })); |
|
|
|
#else |
|
|
@@ -76,8 +76,8 @@ class GE_FUNC_VISIBILITY StringUtils { |
|
|
|
/// @param [in] delim separator |
|
|
|
/// @return string array after segmentation |
|
|
|
/// |
|
|
|
static std::vector<std::string> Split(const std::string &str, char delim) { |
|
|
|
std::vector<std::string> elems; |
|
|
|
static std::vector<std::string> Split(const std::string &str, char delim) { /*lint !e1077*/ |
|
|
|
std::vector<std::string> elems; /*lint !e1077*/ |
|
|
|
|
|
|
|
if (str.empty()) { |
|
|
|
elems.emplace_back(""); |
|
|
|