desensitize static method
字符串脱敏处理 Desensitize string
Implementation
static String desensitize(String str, {int start = 0, int? end, String replace = '*'}) {
end ??= str.length;
if (start < 0) start = 0;
if (end > str.length) end = str.length;
if (start >= end) return str;
return str.replaceRange(start, end, replace * (end - start));
}