//测试demo
public static void main(String[] args) {
int a=91151561;
for (byte b : (a).getBytes()) {
char c=(char) (b + 48);
String str=(c);
(());
}
}
//数字与ASCII码之间互转换
public class TestConvert {
// 将字母转换成数字_1
public static String t1(String input) {
String reg = "[a-zA-Z]";
StringBuffer strBuf = new StringBuffer();
input = ();
if (null != input && !"".equals(input)) {
for (char c : ()) {
if ((c).matches(reg)) {
(c - 96);
} else {
(c);
}
}
return ();
} else {
return input;
}
}
// 将字母转换成数字
public static void letterToNum(String input) {
for (byte b : ()) {
(b - 96);
}
}
// 将数字转换成字母
public static void numToLetter(String input) {
for (byte b : ()) {
((char) (b + 48));
}
}
public static void main(String[] args) {
String i1 = "abcdef";
String i2 = "123456";
letterToNum(i1);
();
numToLetter(i2);
}
}