Lines Matching defs:fmt

1 /* Defines String::compose(fmt, arg...) for easy, i18n-friendly
49 explicit Composition(std::string fmt);
139 inline Composition::Composition(std::string fmt)
146 while (i < fmt.length()) {
147 if (fmt[i] == '%' && i + 1 < fmt.length()) {
148 if (fmt[i + 1] == '%') { // catch %%
149 fmt.replace(i, 2, "%");
152 else if (is_number(fmt[i + 1])) { // aha! a spec!
154 output.push_back(fmt.substr(b, i - b));
160 spec_no += char_to_int(fmt[i + n]);
163 } while (i + n < fmt.length() && is_number(fmt[i + n]));
183 output.push_back(fmt.substr(b, i - b));
206 inline std::string compose(const std::string &fmt, const T1 &o1)
208 StringPrivate::Composition c(fmt);
214 inline std::string compose(const std::string &fmt,
217 StringPrivate::Composition c(fmt);
223 inline std::string compose(const std::string &fmt,
226 StringPrivate::Composition c(fmt);
232 inline std::string compose(const std::string &fmt,
236 StringPrivate::Composition c(fmt);
242 inline std::string compose(const std::string &fmt,
246 StringPrivate::Composition c(fmt);
253 inline std::string compose(const std::string &fmt,
257 StringPrivate::Composition c(fmt);
264 inline std::string compose(const std::string &fmt,
269 StringPrivate::Composition c(fmt);
276 inline std::string compose(const std::string &fmt,
281 StringPrivate::Composition c(fmt);
288 inline std::string compose(const std::string &fmt,
293 StringPrivate::Composition c(fmt);
300 inline std::string compose(const std::string &fmt,
306 StringPrivate::Composition c(fmt);
315 inline std::string compose(const std::string &fmt,
321 StringPrivate::Composition c(fmt);
330 inline std::string compose(const std::string &fmt,
336 StringPrivate::Composition c(fmt);
345 inline std::string compose(const std::string &fmt,
352 StringPrivate::Composition c(fmt);
361 inline std::string compose(const std::string &fmt,
368 StringPrivate::Composition c(fmt);
378 inline std::string compose(const std::string &fmt,
385 StringPrivate::Composition c(fmt);