auto static method

String auto(
  1. String value
)

Automatically replaces characters based on predefined replacement rules.

Parameters:

  • value: The input string to perform replacements on.

Example:

String result = Replacement.auto("Hello! How are you?");
print(result); // Output: 'Hello How are you'

Implementation

static String auto(String value) {
  for (int index = 0; index < value.length; index++) {
    for (String reg in Regex.none) {
      value = value.replaceAll(reg, "");
    }
    for (String s in Regex.slash) {
      value = value.replaceAll(s, "_");
    }
  }
  return value;
}