Logo

Programming-Idioms

History of Idiom 63 > diff from v24 to v25

Edit summary for version 25 by :
New Csharp implementation by user [bdadams]

Version 24

2016-01-04, 11:29:27

Version 25

2016-02-16, 18:58:34

Idiom #63 Replace fragment of a string

Assign to x2 the value of string x with all occurrences of y replaced by z.
Assume occurrences of y are not overlapping.

Idiom #63 Replace fragment of a string

Assign to x2 the value of string x with all occurrences of y replaced by z.
Assume occurrences of y are not overlapping.

Code
string x2 = x.Replace(y, z);