Interface JavaCCConstants

    • Method Detail

      • displayChar

        static String displayChar​(int ch)
      • stringFromBytes

        static String stringFromBytes​(byte[] bytes)
        Rather bloody-minded way of converting a byte array into a string taking into account the initial byte order mark (used by Microsoft a lot seemingly) See: https://docs.microsoft.com/es-es/globalization/encoding/byte-order-markc
        Parameters:
        bytes - the raw byte array
        Returns:
        A String taking into account the encoding in the byte order mark (if it was present). If no byte-order mark was present, it assumes the raw input is in UTF-8.