StringReplaceAll
Description
Replaces the old_value string in str with new_value.
Prototype
APIs taking string arguments will be deprecated in future releases. Use APIs taking non-string arguments instead.
static std::string StringReplaceAll(std::string str, const std::string &old_value, const std::string &new_value); static AscendString StringReplaceAll(const char_t *str, const char_t *old_value, const char_t *new_value);
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
str |
Input |
Source string to be processed |
old_value |
Input |
String to be replaced |
new_value |
Input |
String used to replace old_value |
Returns
Parameter |
Description |
|---|---|
- |
New string |
Restrictions
None
Parent topic: Class ScopeUtil