Class NumericUtil


  • public class NumericUtil
    extends Object
    a class to deal with Chinese numeric
    Author:
    chenxin
    • Constructor Detail

      • NumericUtil

        public NumericUtil()
    • Method Detail

      • isCNNumeric

        public static int isCNNumeric​(char c)
        check if the given char is a Chinese numeric or not
        Parameters:
        c -
        Returns:
        int the numeric value
      • isCNNumericString

        public static boolean isCNNumericString​(String str,
                                                int sIdx,
                                                int eIdx)
        check if the specified string is a Chinese numeric string
        Parameters:
        str -
        Returns:
        boolean
      • cnNumericToArabic

        public static int cnNumericToArabic​(String cnn,
                                            boolean flag)
        a static method to turn the Chinese numeric to Arabic numbers
        Parameters:
        cnn -
        flag -
        Returns:
        int
      • qCNNumericToArabic

        public static int qCNNumericToArabic​(String cnn)