abstract class Format{
  static String getEllipsisPhone(String phone){
    if (phone.length == 11) {
      return phone.replaceRange(3, 7, '****');
    }
    return phone;
  }

  static String getEllipsisName(String name){
    if (name.length > 1) {
      var ellipsis = '';
      for (int i = 0; i < name.length-1; i++) {
        ellipsis += '*';
      }
      return name.replaceRange(0, name.length -1, ellipsis);
    }
    return name;
  }

  static String getMidEllipsisString(String name){
    if (name.length > 2) {
      var ellipsis = '';
      for (int i = 1; i < name.length-1; i++) {
        ellipsis += '*';
      }
      return name.replaceRange(1, name.length -1, ellipsis);
    }else{
      return getEllipsisName(name);
    }
  }



}