replace function
Replaces the first occurrence of a substring.
print(replace('l', 'w', 'hello')); // Outputs: 'hewlo'
Implementation
String replace(String searchValue, String replaceValue, String s) =>
s.replaceFirst(RegExp(searchValue), replaceValue);