multiple static method

String multiple(
  1. String value,
  2. List<String> replacements,
  3. List<String> regex
)

Implementation

static String multiple(
  String value,
  List<String> replacements,
  List<String> regex,
) {
  final valid = Validator.isMatched(regex.length, replacements.length);
  if (regex.isNotEmpty && valid) {
    for (int index = 0; index < value.length; index++) {
      value = value.replaceAll(regex[index], replacements[index]);
    }
  }
  return value;
}