现在的位置: 首页 > 综合 > 正文

项目中学到的

2013年10月28日 ⁄ 综合 ⁄ 共 258字 ⁄ 字号 评论关闭

int nResId = res.getIdentifier(String.format("smiley_%d", nIndex), "drawable", strPackageName);

String.format("smiley_%d", nIndex)

正则表达式:

private static Pattern mPattern = Pattern.compile("\\[([a-zA-Z0-9\\u4e00-\\u9fa5]+?)\\]");


Matcher matcher = mPattern.matcher(strMessage);

抱歉!评论已关闭.