Class CJKTextWidthCounter

java.lang.Object
net.sourceforge.argparse4j.helper.CJKTextWidthCounter
All Implemented Interfaces:
TextWidthCounter

public class CJKTextWidthCounter extends Object implements 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.

  • Constructor Details

    • CJKTextWidthCounter

      public CJKTextWidthCounter()
  • Method Details

    • width

      public int width(String text)
      Description copied from interface: TextWidthCounter
      Counts given text consumes how many fixed character width.
      Specified by:
      width in interface TextWidthCounter
      Parameters:
      text - The text to inspect.
      Returns:
      The computed value.