Logo

Programming-Idioms

History of Idiom 63 > diff from v30 to v31

Edit summary for version 31 by elbrujohalcon:
New Erlang implementation by user [elbrujohalcon]

Version 30

2016-04-08, 13:17:28

Version 31

2016-07-12, 21:01:52

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
X2 = binary:replace(X, Y, Z, [global]).
Doc URL
http://erldocs.com/maint/stdlib/binary.html#replace/3