MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / replaceCharacters

Function replaceCharacters

Source/Falcor/Utils/StringUtils.cpp:137–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137std::string replaceCharacters(const std::string& str, const char* characters, const char replacement)
138{
139 std::string result(str);
140 size_t pos = result.find_first_of(characters);
141 while (pos != std::string::npos)
142 {
143 result[pos] = replacement;
144 pos = result.find_first_of(characters, pos);
145 }
146 return result;
147}
148
149std::string padStringToLength(const std::string& str, size_t length, char padding)
150{

Callers 2

getFuncNameMethod · 0.85
CPU_TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

CPU_TESTFunction · 0.68