Simple Replace function
Chadtech opened this issue · comments
Chadtech commented
Hi,
I use this function a lot.
replace : String -> String -> String -> String
replace target replacement str =
str
|> String.split target
|> String.join replacement
Ive used it to replace spaces with underscores, and to replace %2F
with /
when decoding urls inside json.
Would this be a good addition to String.Extra
?
José Lorenzo Rodríguez commented
It already exists in the core String module, see #33
Chadtech commented
Oops. Okay then. No need.