标签:转换 string pattern style pat sof match microsoft pil
判断字符串是不是数字(正负均可)
boolean isNumber(String str) {
Pattern pattern = Pattern.compile("-?[0-9]+\\.?[0-9]*");
Matcher isNum = pattern.matcher(str);
if (!isNum.matches()) {
return false;
}
return true;
}
byte[]向String的转换
String string=new String(bytes, "ISO-8859-1")
标签:转换 string pattern style pat sof match microsoft pil
原文地址:http://www.cnblogs.com/dejavu96/p/7326622.html