30 String::size_type pos = 0;
31 std::vector<String> substrings;
34 substrings.push_back(
"");
37 while ((pos = s.find(delimiter)) != String::npos)
39 substrings.push_back(s.substr(0, pos));
40 s.erase(0, pos+delimiter.size());
44 substrings.push_back(s);
52 for (std::vector<String>::const_iterator it = substrings.begin(); it != substrings.end(); ++it)
54 if (it != substrings.begin())
65 std::string result =
"";
67 std::string::size_type length = str.length();
69 std::string::size_type trim_front = 0;
70 while ((trim_front < length) && isspace(static_cast<unsigned char>(str[trim_front])))
75 std::string::size_type trim_end = length - 1;
76 while ((trim_end > trim_front) && isspace(static_cast<unsigned char>(str[trim_end])))
81 if (trim_front == length)
87 result = str.substr(trim_front, trim_end - trim_front + 1);
94 #ifdef _IC_BUILDER_DEPRECATED_STYLE_ Contains helper functions for dealing with String.
std::vector< String > split(const String &str, const String &delimiter)
String trim(String const &str)
String join(const std::vector< String > &substrings, const String &delimiter)