2013年9月22日

计算字符串中字符个数

摘要: public int getSubNumber(String des, String reg) { Pattern p = Pattern.compile(reg); Matcher m = p.matcher(des); int count = 0;//记录个数 while(m.find()){ count++; } return count;} 阅读全文

posted @ 2013-09-22 11:24 lyeoswu 阅读(205) 评论(0) 推荐(0) 编辑

导航