Lines Matching defs:str

108 static inline bool fromString(const std::string &str, T &result)
115 if (str.find_first_of(std::string("\r\n\t\v ")) != std::string::npos) {
122 if (str.find("-") != std::string::npos
127 std::stringstream ss(str);
131 if (str.substr(0, 2) == "0x") {
146 static inline bool toString(const T &value, std::string &str)
156 str = oss.str();
167 static inline bool run(const std::string &str, dstType &result)
169 return fromString<dstType>(str, result);
177 static inline bool run(const srcType &str, std::string &result)
179 return toString<srcType>(str, result);
228 * @param[in] str the string to parse.
234 inline bool convertTo<std::string, int16_t>(const std::string &str, int16_t &result)
238 if (!convertTo<std::string, int64_t>(str, res)) {
260 * @param[in] str the string to parse.
266 inline bool convertTo<std::string, float>(const std::string &str, float &result)
268 if (!details::Converter<std::string, float>::run(str, result)) {
290 * @param[in] str the string to parse.
296 inline bool convertTo<std::string, double>(const std::string &str, double &result)
298 if (!details::Converter<std::string, double>::run(str, result)) {
322 * @param[in] str the string to parse.
328 inline bool convertTo<std::string, bool>(const std::string &str, bool &result)
330 if (str == "0" || str == "FALSE" || str == "false") {
335 if (str == "1" || str == "TRUE" || str == "true") {
369 * @param[in] str the string to parse.
375 inline bool convertTo<std::string, std::string>(const std::string &str, std::string &result)
377 result = str;