formatString static method
Implementation
static String formatString(String str) {
if (str == "null" || str.isEmpty || str.length < 10) {
return str;
}
String formattedStr = "(";
formattedStr += "${str.substring(0, 3)}) ";
formattedStr += "${str.substring(3, 6)} ";
formattedStr += "${str.substring(6, 8)} ";
formattedStr += str.substring(8);
return formattedStr;
}