substituteASCIIInPlace

@safe pure nothrow @nogc
char[]
substituteASCIIInPlace
(
char from
char to
)
(
return scope char[] source
)
if (
isASCII(from) &&
isASCII(to)
)

Return Value

Type: char[]

in-place substitution from by to in source.

Examples

const x = "_a_b_c_";
char[7] y = x;
y.substituteASCIIInPlace!('_', ' ');
assert(y[] == " a b c ");

Meta