Lines Matching refs:pos
40 size_t pos = 0; in format_string() local
41 while (pos < str->size()) { in format_string()
42 pos = str->find("$", pos); in format_string()
43 if (pos == std::string::npos) break; in format_string()
47 if (str->substr(pos + 1, token.size()) == token) { in format_string()
48 str->replace(pos, token.size() + 1, replacement); in format_string()
50 pos += replacement.size() - 1; in format_string()
52 } else if (str->substr(pos + 1, token.size() + 2) == "{" + token + "}") { in format_string()
53 str->replace(pos, token.size() + 3, replacement); in format_string()
54 pos += replacement.size() - 1; in format_string()
59 ++pos; in format_string()