Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple string replace in Elm?

Tags:

string

elm

Is there an easy way to replace a part of a string in Elm? I am interested in plain search without a regex. (And I understand that I can’t change the string, I am happy to get a new one with the changes in place.)

like image 853
zoul Avatar asked Dec 13 '16 10:12

zoul


1 Answers

The simplest way I could think of:

String.split "from" "target string: blah... from ..."
    |> String.join "to"

https://runelm.io/c/f07

like image 99
Tosh Avatar answered Oct 05 '22 10:10

Tosh