对于string
str,请使用以下
replaceAll()函数:
str = str.toUpperCase(); //Prevent substitutions of characters in the middle of a wordstr = str.replaceAll("A", "velocity");str = str.replaceAll("B", "distance");//etc.
对于string
str,请使用以下
replaceAll()函数:
str = str.toUpperCase(); //Prevent substitutions of characters in the middle of a wordstr = str.replaceAll("A", "velocity");str = str.replaceAll("B", "distance");//etc.