replaceAll 抽象方法
将匹配 from 的所有子字符串替换为 replace。
创建一个新的字符串,其中匹配 from 的非重叠子字符串(由 from.allMatches(thisString) 迭代)被替换为字面量字符串 replace。
'resume'.replaceAll(RegExp(r'e'), 'é'); // 'résumé'
请注意,replace 字符串不会被解释。如果替换取决于匹配(例如,取决于一个 RegExp 的捕获组),请改用 replaceAllMapped 方法。
实现
String replaceAll(Pattern from, String replace);