HomeManualTopicsTypesSymbols

std::replace_first

replaces the first occurence of the specified expressions

Parameters

text
the string to process
args*
the expressions and their replacements

Results

None

Description

This function replaces the first occurence of the specified expressions with their corresponding replacement texts.

Example

$str "abcabc" $str_with_x replace_first(str 'b' = 'x') println! str_with_x

Output

axcabc

Topic

Strings

See also

std::replace_all replaces all occurences of the specified expressions