Files
highground-fork/string/docs/modify/replace.md

594 B

string_Replace

Replace all occurences of from in str with to.

Arguments

  • str (string): the string to run a find and replace on.
  • from (string): the substring you want to replace.
  • to (string): the thing to replace all occurences of from with.

Returns

result (string): the resulting string after the find and replace.

Example

Ground

call !string_Replace "abacabacacacabacacacabac" "c" "b" &result
println $result # "abababababababababababab"

Solstice

puts string_Replace("abacabacacacabacacacabac", "c", "b") // "abababababababababababab"