Lines Matching refs:string

42 #include <string>
49 eat_lead_white(std::string &s)
51 std::string::size_type off = s.find_first_not_of(' ');
52 if (off != std::string::npos) {
53 std::string::iterator begin = s.begin();
59 eat_end_white(std::string &s)
61 std::string::size_type off = s.find_last_not_of(' ');
62 if (off != std::string::npos)
67 eat_white(std::string &s)
73 inline std::string
74 to_lower(const std::string &s)
76 std::string lower;
87 // Split the string s into lhs and rhs on the first occurence of the
90 split_first(const std::string &s, std::string &lhs, std::string &rhs, char c);
92 // Split the string s into lhs and rhs on the last occurence of the
95 split_last(const std::string &s, std::string &lhs, std::string &rhs, char c);
97 // Tokenize the string <s> splitting on the character <token>, and
98 // place the result in the string vector <vector>. If <ign> is true,
102 tokenize(std::vector<std::string> &vector, const std::string &s,
114 __to_number(const std::string &value)
126 __to_number(const std::string &value)
137 __to_number(const std::string &value)
145 __to_number(const std::string &value)
156 * Turn a string representation of a number, either integral or
159 * @param value The string representing the number
165 to_number(const std::string &value, T &retval)
180 * Turn a string representation of a boolean into a boolean value.
183 to_bool(const std::string &value, bool &retval)
185 std::string s = to_lower(value);
198 // Put quotes around string arg if it contains spaces.
199 inline std::string
200 quote(const std::string &s)
202 std::string ret;
203 bool quote = s.find(' ') != std::string::npos;
218 * Return true if 's' starts with the prefix string 'prefix'.
228 * Return true if 's' starts with the prefix string 'prefix'.
231 startswith(const std::string &s, const char *prefix)
238 * Return true if 's' starts with the prefix string 'prefix'.
241 startswith(const std::string &s, const std::string &prefix)