StrReplace
System · system operation · implicitly imported
Replaces every occurrence of a substring in a String.
Parameters
String input— The String to replace in.String toReplace— The substring to replace.String replaceWith— The String to replace each occurrence with.Bool ignoreCase = false— Whentrue,toReplaceis matched case-insensitively.
Returns
String — A new String in which every occurrence of toReplace is replaced by replaceWith.
Errors
A runtime type error if input, toReplace or replaceWith is not a String, or ignoreCase is not a Bool.