Replace Arabic numerals with uppercase letters, and Arabic numerals with uppercase letters.
Essay ------ extract useful.
/**
* @ Description
* @ Author
* @ Date 1:43:25
*/
Package com. yunfan. tmcc. ivr. util;
/**
* @ Description
* @ Author
* @ Date 1:43:25
*/
/**
* @ Description
* @ Author
* @ Date 1:43:25
*/
Public class ReplaceNumber {
/**
*
* @ Description
* @ Param args
* Void return type
*/
Public static void main (String [] args ){
String I = "IVR 1234567890 ";
Char [] aa = I. toCharArray ();
String cc = "";
String a = "";
For (int j = 0; j <aa. length; j ++ ){
If (aa [j] <= '9' & aa [j]> = '0 '){
A = numToUpper (aa [j]);
} Else {
A = "" + aa [j] + "";
}
Cc + =;
}
System. out. println (cc );
}
Public static String numToUpperr (String num ){
Char [] aa = num. toCharArray ();
String cc = "";
String a = "";
For (int j = 0; j <aa. length; j ++ ){
If (aa [j] <= '9' & aa [j]> = '0 '){
A = numToUpper (aa [j]);
} Else {
A = "" + aa [j] + "";
}
Cc + =;
}
Return cc ;}
// Convert the number to uppercase
Public static String numToUpper (char num ){
// String u [] = {"zero", "one", "two", "three", "Si", "Wu", "Lu", "Lu ", "identifier", "identifier "};
String u [] = {"0", "1", "2", "3", "4", "5", "6", "7 ", "8", "9 "};
Char [] str = String. valueOf (num). toCharArray ();
String rstr = "";
For (int I = 0; I <str. length; I ++ ){
Rstr = rstr + u [Integer. parseInt (str [I] + "")];
}
Return rstr;
}
}