支持繁体简体互换. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Threading.Tasks; namespace DLMApi.Utils { /// <summary> /// 中文字符工具类 /// </summary> public class Ch…
对String的操作是Java攻城师必备的,一个优秀的攻城师是懒惰,他会把自己的一些常见的代码写成可提供拓展和复用的工具类或者工具库,这些是这些优秀工程师的法宝. 我就先从String这个基本操作开始吧,Android里有个TextUtils的类,没事点开也看看. public class StringUtils { private static final String regEx_script = "<script[^>]*?>[\\s\\S]*?<\\/script…
ChineseUtil 下载地址:https://github.com/Yurunsoft/ChineseUtil 另外一个中文转拼音工具:https://github.com/overtrue/pinyin PHP 中文工具类,支持汉字转拼音.拼音分词.简繁互转. PHP Chinese Tool class, support Chinese pinyin, pinyin participle, simplified and traditional conversion 目前本类库拥有的三个功…
一些js的工具类 复制代码 /** * Created by sevennight on 15-1-31. * js常用工具类 */ /** * 方法作用:[格式化时间] * 使用方法 * 示例: * 使用方式一: * var now = new Date(); * var nowStr = now.dateFormat("yyyy-MM-dd hh:mm:ss"); * 使用方式二: * new Date().dateFormat("yyyy年MM月dd日");…
MD5加密 import android.annotation.SuppressLint; import java.security.MessageDigest; public class MD5 { @SuppressLint("DefaultLocale") public static String hex(byte[] array) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < array.lengt…