26 #ifndef INCLUDE_OLA_STRINGUTILS_H_
27 #define INCLUDE_OLA_STRINGUTILS_H_
49 vector<string> &tokens,
50 const string &delimiters=
" ");
56 void StringTrim(
string *input);
101 void Escape(
string *original);
129 unsigned int *output,
130 bool strict =
false);
141 bool StringToInt(
const string &value, uint16_t *output,
bool strict =
false);
152 bool StringToInt(
const string &value, uint8_t *output,
bool strict =
false);
163 bool StringToInt(
const string &value,
int *output,
bool strict =
false);
174 bool StringToInt(
const string &value, int16_t *output,
bool strict =
false);
185 bool StringToInt(
const string &value, int8_t *output,
bool strict =
false);
301 unsigned int indent = 0,
302 unsigned int byte_per_line = 8);
307 template <
typename int_type>
309 if (input.find(
"0x") != 0)
311 string modified_input = input.substr(2);
321 std::ostringstream str;
322 typename T::const_iterator iter = input.begin();
323 while (iter != input.end()) {
325 if (iter != input.end())
331 #endif // INCLUDE_OLA_STRINGUTILS_H_