类 UPinYin

java.lang.Object
com.gdxsoft.easyweb.utils.UPinYin

public class UPinYin extends Object
  • 构造器详细资料

    • UPinYin

      public UPinYin()
  • 方法详细资料

    • convertToSimpleChinese

      public static char convertToSimpleChinese(char c)
      转换为简体中文
      参数:
      c -
      返回:
    • convertToPinyinFirstAlpha

      public static String convertToPinyinFirstAlpha(String str, boolean xingFirst) throws Exception
      转换为拼音首字母,例如张三,返回zs
      参数:
      str -
      xingFirst - 姓的拼音在前
      返回:
      抛出:
      Exception
    • convertToPinyinList

      public static List<String> convertToPinyinList(String str, boolean xingFirst) throws Exception
      转换为拼音列表
      参数:
      str -
      xingFirst - 姓的拼音在前
      返回:
      抛出:
      Exception
    • convertToPinyin

      public static String convertToPinyin(char c, boolean xingFirst) throws Exception
      抛出:
      Exception
    • convertWithoutTone

      public static List<String> convertWithoutTone(String str, boolean xingFirst) throws Exception
      将带声调格式的拼音转换为不带声调格式的拼音
      参数:
      str - 字符串
      xingFirst - 姓的拼音在前
      返回:
      不带声调的拼音
      抛出:
      Exception
    • convertWithoutToneString

      public static String convertWithoutToneString(String str, boolean xingFirst) throws Exception
      将带声调格式的拼音转换为不带声调格式的拼音字符串,用,分隔
      参数:
      str - 字符串
      xingFirst - 姓的拼音在前
      返回:
      不带声调格式的拼音字符串,用,分隔
      抛出:
      Exception
    • isChinese

      public static boolean isChinese(char c)
      判断某个字符是否为汉字
      参数:
      c - 需要判断的字符
      返回:
      是汉字返回true,否则返回false