Formatting library ("fmt")
This library includes functions and objects for parsing binary and text buffers.
- binary format -- fmt_pack, fmt_unpack, fmt_pack_count, fmt_pack_size
- base64 format -- fmt_base64_encode, fmt_base64_decode
- custom format -- fmt_custom_encode
- text format -- fmt_parser, fmt_text, fmt_charcc
Functions:
- fmt_pack - pack variables into a byte buffer, according to the format string
- fmt_unpack - unpack byte buffer to an array of variables, according to the format string
- fmt_pack_count - returns the number of items found in a packing format string
- fmt_pack_size - returns the number of bytes found in a packing format string
- fmt_base64_encode - encodes a byte buffer in base64 character buffer (A-Za-z0-9+/)
- fmt_base64_decode - decodes a base64 character buffer (A-Za-z0-9+/) to a byte buffer
- fmt_custom_encode - encodes a custom format (selected character codes to numeric version)
- fmt_text - formats specified variables according to the format string
- fmt_parser - creates a text parser object with the specified stream reading function
- fmt_string_parser - creates a text parser object that reads from the specified string
- fmt_file_parser - creates a text parser object that reads from the specified file
- fmt_charcc - checks if a character is in the character class
Objects and their methods:
- fmt_parser - formatted text string-parsing object
- read - read the specified number of characters from the stream
- getchar - read one character from the stream
- readcc - read characters while they match the specified class
- skipcc - skip characters while they match the specified class
- read_real - read with the real value character class, optionally return real
- read_int - read with the integer value character class, optionally return integer
- read_binary_int - read with the binary integer character class, optionally -return integer
- read_octal_int - read with the octal integer character class, optionally return -integer
- read_decimal_int - read with the decimal integer character class, optionally -return integer
- read_hex_int - read with the hexadecimal integer character class, optionally return -integer
- check - check for presence of a string in stream
In this section:
- fmt_pack [function]
- fmt_unpack [function]
- fmt_pack_count [function]
- fmt_pack_size [function]
- fmt_base64_encode [function]
- fmt_base64_decode [function]
- fmt_custom_encode [function]
- fmt_text [function]
- fmt_parser [function]
- fmt_string_parser [function]
- fmt_file_parser [function]
- fmt_charcc [function]
- fmt_parser [object]
- fmt_parser.read [method]
- fmt_parser.getchar [method]
- fmt_parser.readcc [method]
- fmt_parser.skipcc [method]
- fmt_parser.read_real [method]
- fmt_parser.read_int [method]
- fmt_parser.read_binary_int [method]
- fmt_parser.read_octal_int [method]
- fmt_parser.read_decimal_int [method]
- fmt_parser.read_hex_int [method]
- fmt_parser.check [method]
- ALL SGScript formatting functions (A-Z)