Class CJKTextWidthCounter
java.lang.Object
net.sourceforge.argparse4j.helper.CJKTextWidthCounter
- All Implemented Interfaces:
TextWidthCounter
CJK aware TextWidthCounter implementation.
This class uses East Asian Width information of Unicode and counts 2 for Wide, Full and Ambiguous characters.
The application code should not use this class directly.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classRange is [first, last)private static classprivate static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final CJKTextWidthCounter.CpRangeCmpprivate static final CJKTextWidthCounter.CpRange[]Compiled using wfarange.py. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
cpRangeCmp_
-
ranges_
Compiled using wfarange.py. # EastAsianWidth-10.0.0.txt # Date: Wed Aug 2 00:29:26 PDT 2017
-
-
Constructor Details
-
CJKTextWidthCounter
public CJKTextWidthCounter()
-
-
Method Details
-
width
Description copied from interface:TextWidthCounterCounts given text consumes how many fixed character width.- Specified by:
widthin interfaceTextWidthCounter- Parameters:
text- The text to inspect.- Returns:
- The computed value.
-