摘要: public String getCharset(String file) throws IOException { BufferedInputStream bin = new BufferedInputStream(new FileInputStream(file)); int p = (bin.read() << 8) + bin.read(); String code = null; switch (p) { case 0xefbb: code = "UTF-8"; brea... 阅读全文
posted @ 2013-08-28 21:13 eyotata 阅读(413) 评论(0) 推荐(0) 编辑
摘要: var regex=/(.).*(\1)/; var str="a sa"; console.log(regex.test(str)); //判断用户输入是否有重复字符 阅读全文
posted @ 2013-08-28 00:08 eyotata 阅读(130) 评论(0) 推荐(0) 编辑