replace static method

String replace(
  1. String? text,
  2. Pattern from,
  3. String replace
)

替换字符串中的数据

Implementation

static String replace(String? text, Pattern from, String replace) {
  if (isEmpty(text)) {
    return "";
  }
  return text!.replaceAll(from, replace);
}