Package org.jcodings

Class CaseFoldMapEncoding

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ISOEncoding, KOI8Encoding, KOI8REncoding, KOI8UEncoding, Windows_1250Encoding, Windows_1251Encoding, Windows_1252Encoding, Windows_1253Encoding, Windows_1254Encoding, Windows_1257Encoding

public abstract class CaseFoldMapEncoding extends SingleByteEncoding
  • Field Details

    • CaseFoldMap

      protected final int[][] CaseFoldMap
    • foldFlag

      protected final boolean foldFlag
    • SS

      static final int[] SS
  • Constructor Details

    • CaseFoldMapEncoding

      protected CaseFoldMapEncoding(String name, short[] CTypeTable, byte[] LowerCaseTable, int[][] CaseFoldMap)
    • CaseFoldMapEncoding

      protected CaseFoldMapEncoding(String name, short[] CTypeTable, byte[] LowerCaseTable, int[][] CaseFoldMap, boolean foldFlag)
  • Method Details

    • applyAllCaseFoldWithMap

      protected final int applyAllCaseFoldWithMap(int mapSize, int[][] map, boolean essTsettFlag, int flag, ApplyAllCaseFoldFunction fun, Object arg)
      onigenc_apply_all_case_fold_with_map
    • ssApplyAllCaseFold

      private void ssApplyAllCaseFold(int flag, ApplyAllCaseFoldFunction fun, Object arg)
      ss_apply_all_case_fold
    • getCaseFoldCodesByStringWithMap

      protected final CaseFoldCodeItem[] getCaseFoldCodesByStringWithMap(int mapSize, int[][] map, boolean essTsettFlag, int flag, byte[] bytes, int p, int end)
      onigenc_get_case_fold_codes_by_str_with_map
    • applyAllCaseFold

      public void applyAllCaseFold(int flag, ApplyAllCaseFoldFunction fun, Object arg)
      Description copied from class: AbstractEncoding
      onigenc_ascii_apply_all_case_fold / used also by multibyte encodings
      Overrides:
      applyAllCaseFold in class AbstractEncoding
      Parameters:
      flag - case fold flag
      fun - case folding functor (look at: ApplyCaseFold)
      arg - case folding functor argument (look at: ApplyCaseFoldArg) Oniguruma equivalent: apply_all_case_fold
    • caseFoldCodesByString

      public CaseFoldCodeItem[] caseFoldCodesByString(int flag, byte[] bytes, int p, int end)
      Description copied from class: AbstractEncoding
      onigenc_ascii_get_case_fold_codes_by_str / used also by multibyte encodings
      Overrides:
      caseFoldCodesByString in class AbstractEncoding
    • isCodeCType

      public boolean isCodeCType(int code, int ctype)
      Description copied from class: Encoding
      Perform a check whether given code is of given character type (e.g. used by isWord(someByte) and similar methods)
      Specified by:
      isCodeCType in class Encoding
      Parameters:
      code - a code point of a character
      ctype - a character type to check against Oniguruma equivalent: is_code_ctype