toUserName static method

String toUserName(
  1. String name, {
  2. List<String>? regexList,
  3. List<String>? replacements,
})

Implementation

static String toUserName(
  String name, {
  List<String>? regexList,
  List<String>? replacements,
}) {
  final String current = Replacement.auto(name).toLowerCase();
  if (replacements != null) {
    return Replacement.multiple(current, replacements, regexList ?? []);
  } else {
    return Replacement.single(current, "", regexList);
  }
}