- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
public class RussianNumberUtils {
public static String getRussianNumberFormat(String number) {
StringBuilder numberBuilder = new StringBuilder();
try {
numberBuilder.append("+");
numberBuilder.append(number.charAt(0));
numberBuilder.append(" (");
numberBuilder.append(number.substring(1, 4));
numberBuilder.append(") ");
numberBuilder.append(number.substring(4, 7));
numberBuilder.append("-");
numberBuilder.append(number.substring(7, 9));
numberBuilder.append("-");
numberBuilder.append(number.substring(9, Math.max(number.length(), 11)));
return numberBuilder.toString();
} catch (Exception e) {}
return number;
}
}