java.lang.Object
org.springframework.shell.test.jediterm.terminal.util.CharUtils

public class CharUtils extends Object
  • Field Details

  • Method Details

    • getNonControlCharacters

      public static String getNonControlCharacters(int maxChars, char[] buf, int offset, int charsLength)
    • countDoubleWidthCharacters

      public static int countDoubleWidthCharacters(char[] buf, int start, int length, boolean ambiguousIsDWC)
    • appendChar

      public static CharUtils.CharacterType appendChar(StringBuilder sb, CharUtils.CharacterType last, char c)
    • appendBuf

      public static void appendBuf(StringBuilder sb, char[] bs, int begin, int length)
    • makeCode

      public static byte[] makeCode(int... bytesAsInt)
    • getTextLengthDoubleWidthAware

      public static int getTextLengthDoubleWidthAware(char[] buffer, int start, int length, boolean ambiguousIsDWC)
      Computes text length as sum of characters length, treating double-width(full-width) characters as 2, normal-width(half-width) as 1 (Read http://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
    • isDoubleWidthCharacter

      public static boolean isDoubleWidthCharacter(int c, boolean ambiguousIsDWC)
    • heavyDecCompatibleBuffer

      public static CharBuffer heavyDecCompatibleBuffer(CharBuffer buf)
    • toHumanReadableText

      public static String toHumanReadableText(String escapeSequence)