Package org.jcodings

Class CanBeTrailTableEncoding

    • Field Detail

      • CanBeTrailTable

        protected final boolean[] CanBeTrailTable
    • Constructor Detail

      • CanBeTrailTableEncoding

        protected CanBeTrailTableEncoding​(java.lang.String name,
                                          int minLength,
                                          int maxLength,
                                          int[] EncLen,
                                          int[][] Trans,
                                          short[] CTypeTable,
                                          boolean[] CanBeTrailTable)
    • Method Detail

      • leftAdjustCharHead

        public int leftAdjustCharHead​(byte[] bytes,
                                      int p,
                                      int s,
                                      int end)
        Description copied from class: Encoding
        Seeks the previous character head in a stream Oniguruma equivalent: left_adjust_char_head
        Specified by:
        leftAdjustCharHead in class Encoding
        Parameters:
        bytes - byte stream
        p - position
        s - stop
        end - end
      • isReverseMatchAllowed

        public boolean isReverseMatchAllowed​(byte[] bytes,
                                             int p,
                                             int end)
        Description copied from class: Encoding
        Returns true if it's safe to use reversal Boyer-Moore search fail fast algorithm Oniguruma equivalent: is_allowed_reverse_match
        Specified by:
        isReverseMatchAllowed in class Encoding