replaceAll#
Fully qualified name: omni::extras::replaceAll
Defined in omni/extras/StringHelpers.h
- inline void omni::extras::replaceAll( )#
Replaces all instances of a substring within a given string with a replacement value.
This function calls
std::string::replace()in a loop so that all instances are replaced.Note
The replacement is not recursive, so
replaceWithmay contain the substringsubStrwithout causing endless recursion. Whenever a replacement occurs, the search forsubStrresumes after the insertedreplaceWith.- Parameters:
str – The string to modify in-place
subStr – The substring to find within
strreplaceWith – The substring that all instances of
subStrare replaced with