Android examples for android.telephony:Phone Number
add Divider To Phone Number
public class Main{ public static String addDividerToPhoneNumber(String phoneNumber) { StringBuilder sb = new StringBuilder(); sb.append(phoneNumber.substring(0, 3)); sb.append("-"); sb.append(phoneNumber.substring(3, 7)); sb.append("-"); sb.append(phoneNumber.substring(7)); return sb.toString(); }/* ww w.j av a 2 s .c om*/ }