engToBan static method
String
engToBan(
- dynamic inputValue
)
Implementation
static String engToBan(inputValue) {
var strList = inputValue.toString().split(''); //convert to string and make a list
List<String> returnList = []; //declare a list variable
for (var str in strList) { //loop on the list
switch (str) { //switch case to convert number and add to the list
case "0":
returnList.add("০");
break;
case "1":
returnList.add("১");
break;
case "2":
returnList.add("২");
break;
case "3":
returnList.add("৩");
break;
case "4":
returnList.add("৪");
break;
case "5":
returnList.add("৫");
break;
case "6":
returnList.add("৬");
break;
case "7":
returnList.add("৭");
break;
case "8":
returnList.add("৮");
break;
case "9":
returnList.add("৯");
break;
default:
returnList.add(str);
break;
}
}
return returnList.join(""); //return all join list
}