Lines Matching full:replacements
53 // Replaces character sequences within a given string with replacements provided
54 // within an initializer list of key/value pairs. Candidate replacements are
71 replacements);
79 // std::map<const absl::string_view, const absl::string_view> replacements;
80 // replacements["$who"] = "Bob";
81 // replacements["$count"] = "5";
82 // replacements["#Noun"] = "Apples";
85 // replacements);
89 // std::vector<std::pair<const absl::string_view, std::string>> replacements;
90 // replacements.push_back({"&", "&"});
91 // replacements.push_back({"<", "<"});
92 // replacements.push_back({">", ">"});
94 // replacements);
98 const StrToStrMapping& replacements);
101 // output string *in place* with replacements provided within an initializer
115 replacements,
119 // string *in place* with replacements provided within a container of key/value
131 int StrReplaceAll(const StrToStrMapping& replacements, std::string* target);
154 // replacements. subs can be implemented as a priority_queue. However, it turns
159 absl::string_view s, const StrToStrMapping& replacements) { in FindSubstitutions() argument
161 subs.reserve(replacements.size()); in FindSubstitutions()
163 for (const auto& rep : replacements) { in FindSubstitutions()
195 const StrToStrMapping& replacements) { in StrReplaceAll() argument
196 auto subs = strings_internal::FindSubstitutions(s, replacements); in StrReplaceAll()
204 int StrReplaceAll(const StrToStrMapping& replacements, std::string* target) { in StrReplaceAll() argument
205 auto subs = strings_internal::FindSubstitutions(*target, replacements); in StrReplaceAll()