33 *returned = s ==
"true";
34 if (!returned && s !=
"false")
57 return ((*endptr) ==
'\0');
76 return ((*endptr) ==
'\0');
94 return ((*endptr) ==
'\0');
100 bool trimLeadingSpaces
103 std::stringstream ss(s);
108 std::string substring;
115 if (trimLeadingSpaces)
118 size_t firstcharpos = substring.find_first_not_of(
' ');
119 if (firstcharpos != std::string::npos)
121 substring = substring.substr(firstcharpos);
125 result.push_back(substring);
134 bool trimLeadingSpaces
139 StdStrings::const_iterator iter = v.begin();
144 std::string substring = *iter;
146 if (trimLeadingSpaces)
149 size_t firstcharpos = substring.find_first_not_of(
' ');
150 if (firstcharpos != std::string::npos)
152 substring = substring.substr(firstcharpos);
156 if (result.length() == 0)
162 result += (delimiter + substring);
172 bool trimLeadingSpaces
177 CharStrings::const_iterator iter = v.begin();
182 std::string substring(*iter);
184 if (trimLeadingSpaces)
187 size_t firstcharpos = substring.find_first_not_of(
' ');
188 if (firstcharpos != std::string::npos)
190 substring = substring.substr(firstcharpos);
194 if (result.length() == 0)
200 result += (delimiter + substring);
211 StdStrings::const_iterator str = strings.begin();
212 str != strings.end();
216 ret.push_back(str->c_str());
225 CharStrings::const_iterator chr = strings.begin();
226 chr != strings.end();
230 std::string str(*chr);
242 const size_t len = strlen(source);
243 char* tmpName =
new char[len + 1];
CharStrings ToCharStrings(const StdStrings &strings)
void CloneInto(const char *source, const char *&target)
StdStrings ToStdStrings(const CharStrings &strings)
bool ToBool(const char *s, bool *returned)
bool ToFloat(const char *s, float *returned)
bool ToInt(const char *s, int32_t *returned)
std::string FromVectorOfStrings(const StdStrings &v, char delimiter=',', bool trimLeadingSpaces=true)
bool ToUInt(const char *s, uint32_t *returned)
StdStrings Parse(const std::string &s, char delimiter=',', bool trimLeadingSpaces=true)
std::vector< std::string > StdStrings
std::vector< const char * > CharStrings