Replace()

StringBuilder::Replace(const String&, const String&) method

Replaces substring through the builder.

StringBuilder * System::Text::StringBuilder::Replace(const String &oldString, const String &newString)

Arguments

ParameterTypeDescription
oldStringconst String&String to replace.
newStringconst String&Replacement string.

Return Value

This pointer.

StringBuilder::Replace(const String&, const String&, int, int) method

Replaces substring through the builder’s range.

StringBuilder * System::Text::StringBuilder::Replace(const String &oldString, const String &newString, int position, int count)

Arguments

ParameterTypeDescription
oldStringconst String&String to replace.
newStringconst String&Replacement string.
positionintBuilder’s replacement range beginning position.
countintBuilder’s replacement range length.

Return Value

This pointer.

StringBuilder::Replace(char_t, char_t) method

Replaces character through the builder.

StringBuilder * System::Text::StringBuilder::Replace(char_t oldChar, char_t newChar)

Arguments

ParameterTypeDescription
oldCharchar_tCharacter to replace.
newCharchar_tReplacement character.

Return Value

This pointer.

StringBuilder::Replace(char_t, char_t, int, int) method

Replaces character through the builder’s range.

StringBuilder * System::Text::StringBuilder::Replace(char_t oldChar, char_t newChar, int startIndex, int count)

Arguments

ParameterTypeDescription
oldCharchar_tCharacter to replace.
newCharchar_tReplacement character.
startIndexintBuilder’s replacement range beginning position.
countintBuilder’s replacement range length.

Return Value

This pointer.

See Also