Skip to content

Instantly share code, notes, and snippets.

@sirmagid
Created February 16, 2018 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sirmagid/09116681c004b75ea6def0601b5d0fd9 to your computer and use it in GitHub Desktop.
Save sirmagid/09116681c004b75ea6def0601b5d0fd9 to your computer and use it in GitHub Desktop.
String hid_tel(String tel){
try {
int temp_lengh = tel.length();
String temp_orginal=tel;
tel = tel.substring(tel.length() - 4);
String firest_tel= temp_orginal.substring(0,5);
StringBuffer bf = new StringBuffer();
bf.append(firest_tel);
for (int tok = 6; tok <= temp_lengh - 4; tok++) {
bf.append('#');
}
bf.append(tel);
return bf.toString();
}catch (Exception e){
}
return "#####***####";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment