Package org.lionsoul.jcseg.util
Class NumericUtil
- java.lang.Object
-
- org.lionsoul.jcseg.util.NumericUtil
-
public class NumericUtil extends Object
a class to deal with Chinese numeric- Author:
- chenxin
-
-
Constructor Summary
Constructors Constructor Description NumericUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcnNumericToArabic(String cnn, boolean flag)a static method to turn the Chinese numeric to Arabic numbersstatic intisCNNumeric(char c)check if the given char is a Chinese numeric or notstatic booleanisCNNumericString(String str, int sIdx, int eIdx)check if the specified string is a Chinese numeric stringstatic intqCNNumericToArabic(String cnn)
-
-
-
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)
-
-