Lines Matching refs:std
64 static std::pair< std::string::size_type, std::string >
65 find_next_placeholder(const std::string& format, in find_next_placeholder()
66 const std::string& expansion, in find_next_placeholder()
67 std::string::size_type begin) in find_next_placeholder()
70 while (begin != std::string::npos && expansion[begin + 1] == '%') in find_next_placeholder()
72 if (begin == std::string::npos) in find_next_placeholder()
73 return std::make_pair(expansion.length(), ""); in find_next_placeholder()
77 std::string::size_type end = begin + 1; in find_next_placeholder()
80 const std::string placeholder = expansion.substr(begin, end - begin + 1); in find_next_placeholder()
82 placeholder.find('%', 1) != std::string::npos) in find_next_placeholder()
85 return std::make_pair(begin, placeholder); in find_next_placeholder()
98 to_int(const std::string& format, const std::string& str, const char* what) in to_int()
103 throw format::bad_format_error(format, "Invalid " + std::string(what) + in to_int()
118 static std::ostringstream*
119 new_ostringstream(const std::string& format) in new_ostringstream()
121 std::auto_ptr< std::ostringstream > output(new std::ostringstream()); in new_ostringstream()
132 std::string partial = format.substr(1, format.length() - 2); in new_ostringstream()
138 const std::string::size_type dot = partial.find('.'); in new_ostringstream()
141 if (dot != std::string::npos) { in new_ostringstream()
142 output->setf(std::ios::fixed, std::ios::floatfield); in new_ostringstream()
160 static std::pair< std::string, int >
161 strip_double_percent(const std::string& in, const std::string::size_type begin, in strip_double_percent()
162 std::string::size_type end) in strip_double_percent()
164 std::string part = in.substr(begin, end - begin); in strip_double_percent()
167 std::string::size_type pos = part.find("%%"); in strip_double_percent()
168 while (pos != std::string::npos) { in strip_double_percent()
174 return std::make_pair(in.substr(0, begin) + part + in.substr(end), removed); in strip_double_percent()
188 const std::pair< std::string::size_type, std::string > placeholder = in init()
190 const std::pair< std::string, int > no_percents = in init()
209 format::formatter::formatter(const std::string& format, in formatter()
210 const std::string& expansion, in formatter()
211 const std::string::size_type last_pos) : in formatter()
226 format::formatter::formatter(const std::string& format) : in formatter()
245 const std::string&
256 format::formatter::operator const std::string&(void) const in operator const std::string&()
285 format::formatter::replace(const std::string& arg) const in replace()
290 const std::string expansion = _expansion.substr(0, _placeholder_pos) in replace()