replaceAllOccurrences function

String replaceAllOccurrences(
  1. String input,
  2. String from,
  3. String to
)

Replaces all occurrences of a substring with a new value.

Implementation

String replaceAllOccurrences(String input, String from, String to) {
  return input.replaceAll(from, to);
}