android非法字符的判定、表情符号的判定
来源:互联网 发布:二维码标签机打印软件 编辑:程序博客网 时间:2024/05/16 11:16
记录一下,以便后续自己查看
public void onTextChanged(CharSequence s, int start, int before, int count) { if (s.toString().length() <= 0 || s.toString().matches(".*[/\\\\:*?\"<>|\t].*") || s.toString().matches(".*\\p{So}.*")) {//jimbo rep for bug 13191 // || s.toString().matches(".*[/\\\\:*?\"<>|\t].*")) { // characters not allowed //if (count>=0&&s.toString().substring(start).matches(".*[/\\\\:*?\"<>|\t].*")) { if (count>=0&&s.toString().substring(start).matches(".*[/\\\\:*?\"<>|\t].*") || s.toString().substring(start).matches(".*\\p{So}.*")) {//jimbo rep mToastHelper .showToast(R.string.invalid_char_prompt); } }}
其中 ".*\\p{So}.*" 是判断表情符号
0 0
- android非法字符的判定、表情符号的判定
- Android模拟器的判定
- lotus domino 空字符的判定
- 关于判定字符中是否有中文等非法字符
- android app程序运行状态的判定
- Android之网络连接状态的判定
- android几个使用的判定代码
- android app程序运行状态的判定
- 半角判定的方法
- 回文数的判定
- 边缘检测的判定
- 电子邮箱的判定方法
- root账户的判定
- nyoj129(树的判定)
- 反馈的判定方法
- 树的判定两道题
- NYOJ--树的判定
- 树的判定
- 拓扑排序
- 【每日算法】C语言8大经典排序算法(2)
- Maven添加自定义的源码目录
- JSP页面遍历对象集合,map,数组等,Struts的s标签和c标签的区别
- 微软100题(100)智力题2
- android非法字符的判定、表情符号的判定
- OC基础:NSString NSNumber 如何学习苹果帮助文档
- 杭电ACM1129——Do the Untwist~~解密 密文
- mysql 学习总结
- Modbus重点部分描述
- NEUQ 1022:二叉树
- 配置NDK Cygwin .bash_profile:行47: 语法错误: 未预期的文件结尾 syntax error: unexpected end of file 解决
- Qt获取控件位置,坐标总结
- VC获取操作系统版本和名称