replace method

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

替换字符串中的数据

Implementation

String replace(String text, Pattern from, String replace) {
  return text.replaceAll(from, replace);
}