Created
February 16, 2018 05:52
-
-
Save sirmagid/09116681c004b75ea6def0601b5d0fd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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