Lines Matching refs:string
35 #include <string>
118 static inline bool convertTo(const std::string &str, T &result)
125 if (str.find_first_of(std::string("\r\n\t\v ")) != std::string::npos) {
129 /* Check for a '-' in string. If type is unsigned and a - is found, the
132 if (str.find("-") != std::string::npos && !std::numeric_limits<T>::is_signed) {
155 static inline bool convertToVia(const std::string &str, T &result)
181 * Convert a string to a given type.
183 * This template function read the value of the type T in the given string.
185 * and tries to parse the whole string, which means that if some bytes were not
186 * read in the string, the function fails.
191 * @param[in] str the string to parse.
197 static inline bool convertTo(const std::string &str, T &result)
214 * @param[in] str the string to parse.
220 inline bool convertTo<unsigned char>(const std::string &str, unsigned char &result)
230 inline bool convertTo<signed char>(const std::string &str, signed char &result)
241 * from string to float behaves differently than GNU STL: overflow produce
244 * @param[in] str the string to parse.
250 inline bool convertTo<float>(const std::string &str, float &result)
270 * from string to double behaves differently than GNU STL: overflow produce
273 * @param[in] str the string to parse.
279 inline bool convertTo<double>(const std::string &str, double &result)
299 * string streams when parsing boolean values is not sufficient to fit our
304 * @param[in] str the string to parse.
310 inline bool convertTo<bool>(const std::string &str, bool &result)