src/antlr3string.c(3)

πŸ“¦ version 3.4, in fedora 43

πŸ’– src/antlr3string.c β€” ANTLR3C manual, bestie edition πŸ’–

okay so picture this: you're deep in the ANTLR3C source tree, and you open src/antlr3string.c. That's the file this page is about. It lives in the ANTLR3C section of the manual, and this is part 1 of a two-parter, so don't go anywhere. πŸ¦‹


✨ NAME ✨

src/antlr3string.c β€” the implementation of the ANTLR3 string and string factory classes. that's it, that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

#include <antlr3string.h>

πŸŽ€ Functions πŸŽ€

here's the full cast, no one gets left out, periodt:

  • static pANTLR3_UINT8 addc8 (pANTLR3_STRING string, ANTLR3_UINT32 c) β€” adds a char, 8-bit flavored.
  • static pANTLR3_UINT8 addcUTF16 (pANTLR3_STRING string, ANTLR3_UINT32 c) β€” adds a char, UTF16 flavored.
  • static pANTLR3_UINT8 addi8 (pANTLR3_STRING string, ANTLR3_INT32 i) β€” adds an int, 8-bit flavored.
  • static pANTLR3_UINT8 addiUTF16 (pANTLR3_STRING string, ANTLR3_INT32 i) β€” adds an int, UTF16 flavored.
  • ANTLR3_API pANTLR3_STRING_FACTORY antlr3StringFactoryNew (ANTLR3_UINT32 encoding) β€” the factory-spawning icon itself.
  • static pANTLR3_UINT8 append8 (pANTLR3_STRING string, const char *newbit) β€” append, 8-bit style.
  • static pANTLR3_UINT8 appendS (pANTLR3_STRING string, pANTLR3_STRING newbit) β€” append a whole other string.
  • static pANTLR3_UINT8 appendUTF16_8 (pANTLR3_STRING string, const char *newbit) β€” UTF16 string, 8-bit newbit, you get the drill.
  • static pANTLR3_UINT8 appendUTF16_UTF16 (pANTLR3_STRING string, const char *newbit) β€” UTF16 meeting UTF16, iconic.
  • static ANTLR3_UCHAR charAt8 (pANTLR3_STRING string, ANTLR3_UINT32 offset) β€” peek a char at an offset, 8-bit.
  • static ANTLR3_UCHAR charAtUTF16 (pANTLR3_STRING string, ANTLR3_UINT32 offset) β€” peek a char at an offset, UTF16.
  • static void closeFactory (pANTLR3_STRING_FACTORY factory) β€” "Fascist Capitalist Pig function created to oppress the workers comrade." 😭 (that's literally the doc comment, I'm not even kidding)
  • static ANTLR3_UINT32 compare8 (pANTLR3_STRING string, const char *compStr) β€” compare, 8-bit.
  • static ANTLR3_UINT32 compareS (pANTLR3_STRING string, pANTLR3_STRING compStr) β€” compare two string objects.
  • static ANTLR3_UINT32 compareUTF16_8 (pANTLR3_STRING string, const char *compStr) β€” compare UTF16 against 8-bit.
  • static ANTLR3_UINT32 compareUTF16_UTF16 (pANTLR3_STRING string, const char *compStr) β€” compare UTF16 against UTF16.
  • static void destroy (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string) β€” destroy, but make it factory-aware.
  • static pANTLR3_UINT8 insert8 (pANTLR3_STRING string, ANTLR3_UINT32 point, const char *newbit) β€” insert 8-bit at a point.
  • static pANTLR3_UINT8 inserti8 (pANTLR3_STRING string, ANTLR3_UINT32 point, ANTLR3_INT32 i) β€” insert an int, 8-bit.
  • static pANTLR3_UINT8 insertiUTF16 (pANTLR3_STRING string, ANTLR3_UINT32 point, ANTLR3_INT32 i) β€” insert an int, UTF16.
  • static pANTLR3_UINT8 insertS (pANTLR3_STRING string, ANTLR3_UINT32 point, pANTLR3_STRING newbit) β€” insert a whole string object.
  • static pANTLR3_UINT8 insertUTF16_8 (pANTLR3_STRING string, ANTLR3_UINT32 point, const char *newbit) β€” insert 8-bit into UTF16.
  • static pANTLR3_UINT8 insertUTF16_UTF16 (pANTLR3_STRING string, ANTLR3_UINT32 point, const char *newbit) β€” insert UTF16 into UTF16.
  • static pANTLR3_STRING newPtr8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr, ANTLR3_UINT32 size) β€” "Creates a new 8 bit string initialized with the 8 bit characters at the supplied ptr, of pre-determined size."
  • static pANTLR3_STRING newPtrUTF16_8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr, ANTLR3_UINT32 size) β€” "Creates a new UTF16 string initialized with the 8 bit characters at the supplied 8 bit character ptr, of pre-determined size."
  • static pANTLR3_STRING newPtrUTF16_UTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr, ANTLR3_UINT32 size) β€” "Creates a new UTF16 string initialized with the UTF16 characters at the supplied ptr, of pre-determined size."
  • static pANTLR3_STRING newRaw8 (pANTLR3_STRING_FACTORY factory) β€” a raw 8-bit string, fresh out the box.
  • static pANTLR3_STRING newRawUTF16 (pANTLR3_STRING_FACTORY factory) β€” a raw UTF16 string, also fresh.
  • static pANTLR3_STRING newSize8 (pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size) β€” "Creates a new string with enough capacity for size 8 bit characters plus a terminator."
  • static pANTLR3_STRING newSizeUTF16 (pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size) β€” "Creates a new string with enough capacity for size UTF16 characters plus a terminator."
  • static pANTLR3_STRING newStr8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr) β€” "Create a new 8 bit string from the supplied, null terminated, 8 bit string pointer."
  • static pANTLR3_STRING newStrUTF16_8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr) β€” "Create a new UTF16 string from the supplied, null terminated, 8 bit string pointer."
  • static pANTLR3_STRING newStrUTF16_UTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr) β€” "Create a new UTF16 string from the supplied, null terminated, UTF16 string pointer."
  • static pANTLR3_STRING printable8 (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string) β€” a printable version, 8-bit.
  • static pANTLR3_STRING printableUTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string) β€” a printable version, UTF16.
  • static pANTLR3_UINT8 set8 (pANTLR3_STRING string, const char *chars) β€” set the contents, 8-bit.
  • static pANTLR3_UINT8 setS (pANTLR3_STRING string, pANTLR3_STRING chars) β€” set from another string object.
  • static pANTLR3_UINT8 setUTF16_8 (pANTLR3_STRING string, const char *chars) β€” set UTF16 from 8-bit chars.
  • static pANTLR3_UINT8 setUTF16_UTF16 (pANTLR3_STRING string, const char *chars) β€” set UTF16 from UTF16 chars.
  • static void ANTLR3_CDECL stringFree (pANTLR3_STRING string) β€” free that string, bestie. 🫢
  • static void stringInit8 (pANTLR3_STRING string) β€” init the 8-bit methods.
  • static void stringInitUTF16 (pANTLR3_STRING string) β€” init the UTF16 methods.
  • static void stringInitUTF8 (pANTLR3_STRING string) β€” init the UTF8 methods.
  • static pANTLR3_STRING subString8 (pANTLR3_STRING string, ANTLR3_UINT32 startIndex, ANTLR3_UINT32 endIndex) β€” slice a substring, 8-bit.
  • static pANTLR3_STRING subStringUTF16 (pANTLR3_STRING string, ANTLR3_UINT32 startIndex, ANTLR3_UINT32 endIndex) β€” slice a substring, UTF16.
  • static pANTLR3_STRING to8_8 (pANTLR3_STRING string) β€” 8-bit to 8-bit conversion moment.
  • static pANTLR3_STRING to8_UTF16 (pANTLR3_STRING string) β€” UTF16 to 8-bit conversion moment.
  • static ANTLR3_INT32 toInt32_8 (pANTLR3_STRING string) β€” 8-bit string to ANTLR3_INT32.
  • static ANTLR3_INT32 toInt32_8 (struct ANTLR3_STRING_struct *string) β€” the same deal, struct-pointer flavor.
  • static ANTLR3_INT32 toInt32_UTF16 (pANTLR3_STRING string) β€” UTF16 string to ANTLR3_INT32.
  • static ANTLR3_INT32 toInt32_UTF16 (struct ANTLR3_STRING_struct *string) β€” again, struct-pointer flavor.
  • static pANTLR3_STRING toUTF8_8 (pANTLR3_STRING string) β€” 8-bit to UTF8.
  • static pANTLR3_STRING toUTF8_UTF16 (pANTLR3_STRING string) β€” UTF16 to UTF8.

🌈 Detailed Description 🌈

Implementation of the ANTLR3 string and string factory classes. that's the whole thing, and honestly? iconic. πŸ’œ


πŸ‘‘ Function Documentation πŸ‘‘

⭐ pANTLR3_UINT8 addc8 (pANTLR3_STRING string, ANTLR3_UINT32 c) [static]

References ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_struct::size.

Referenced by stringInit8().

⭐ pANTLR3_UINT8 addcUTF16 (pANTLR3_STRING string, ANTLR3_UINT32 c) [static]

References ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_struct::size.

Referenced by stringInitUTF16().

⭐ pANTLR3_UINT8 addi8 (pANTLR3_STRING string, ANTLR3_INT32 i) [static]

Referenced by stringInit8().

⭐ pANTLR3_UINT8 addiUTF16 (pANTLR3_STRING string, ANTLR3_INT32 i) [static]

Referenced by stringInitUTF16().

⭐ ANTLR3_API pANTLR3_STRING_FACTORY antlr3StringFactoryNew (ANTLR3_UINT32 encoding)

References ANTLR3_ENC_8BIT, ANTLR3_ENC_EBCDIC, ANTLR3_ENC_UTF16, ANTLR3_ENC_UTF16BE, ANTLR3_ENC_UTF16LE, ANTLR3_ENC_UTF32, ANTLR3_ENC_UTF32BE, ANTLR3_ENC_UTF32LE, ANTLR3_ENC_UTF8, antlr3VectorNew(), ANTLR3_STRING_FACTORY_struct::close, closeFactory(), ANTLR3_STRING_FACTORY_struct::destroy, destroy(), ANTLR3_STRING_FACTORY_struct::index, ANTLR3_STRING_FACTORY_struct::newPtr, ANTLR3_STRING_FACTORY_struct::newPtr8, newPtr8(), newPtrUTF16_8(), newPtrUTF16_UTF16(), ANTLR3_STRING_FACTORY_struct::newRaw, newRaw8(), newRawUTF16(), ANTLR3_STRING_FACTORY_struct::newSize, newSize8(), newSizeUTF16(), ANTLR3_STRING_FACTORY_struct::newStr, ANTLR3_STRING_FACTORY_struct::newStr8, newStr8(), newStrUTF16_8(), newStrUTF16_UTF16(), ANTLR3_STRING_FACTORY_struct::printable, printable8(), printableUTF16(), and ANTLR3_STRING_FACTORY_struct::strings.

Referenced by antlr38BitSetupStream(), antlr3EBCDICSetupStream(), antlr3UTF16SetupStream(), antlr3UTF32SetupStream(), and antlr3UTF8SetupStream().

⭐ pANTLR3_UINT8 append8 (pANTLR3_STRING string, const char * newbit) [static]

References ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_struct::size.

Referenced by stringInit8().

⭐ pANTLR3_UINT8 appendS (pANTLR3_STRING string, pANTLR3_STRING newbit) [static]

References ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_struct::size.

Referenced by stringInit8(), and stringInitUTF16().

⭐ pANTLR3_UINT8 appendUTF16_8 (pANTLR3_STRING string, const char * newbit) [static]

References ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_struct::size.

Referenced by stringInitUTF16().

⭐ pANTLR3_UINT8 appendUTF16_UTF16 (pANTLR3_STRING string, const char * newbit) [static]

First, determine the length of the input string.

References ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_struct::size.

Referenced by stringInitUTF16().

⭐ ANTLR3_UCHAR charAt8 (pANTLR3_STRING string, ANTLR3_UINT32 offset) [static]

References ANTLR3_STRING_struct::len.

Referenced by stringInit8().

⭐ ANTLR3_UCHAR charAtUTF16 (pANTLR3_STRING string, ANTLR3_UINT32 offset) [static]

References ANTLR3_STRING_struct::len.

Referenced by stringInitUTF16().

⭐ void closeFactory (pANTLR3_STRING_FACTORY factory) [static]

Fascist Capitalist Pig function created to oppress the workers comrade. 😀 (their words, not mine)

References ANTLR3_STRING_FACTORY_struct::strings.

Referenced by antlr3StringFactoryNew().

⭐ ANTLR3_UINT32 compare8 (pANTLR3_STRING string, const char * compStr) [static]

References ANTLR3_STRING_struct::chars.

Referenced by stringInit8().

⭐ ANTLR3_UINT32 compareS (pANTLR3_STRING string, pANTLR3_STRING compStr) [static]

References ANTLR3_STRING_struct::chars.

Referenced by stringInit8(), and stringInitUTF16().

⭐ ANTLR3_UINT32 compareUTF16_8 (pANTLR3_STRING string, const char * compStr) [static]

References ANTLR3_STRING_struct::chars.

Referenced by stringInitUTF16().

⭐ ANTLR3_UINT32 compareUTF16_UTF16 (pANTLR3_STRING string, const char * compStr) [static]

References ANTLR3_STRING_struct::chars.

Referenced by stringInitUTF16().

⭐ void destroy (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string) [static]

References ANTLR3_VECTOR_struct::del, ANTLR3_VECTOR_ELEMENT_struct::element, ANTLR3_VECTOR_struct::elements, ANTLR3_STRING_FACTORY_struct::index, and ANTLR3_STRING_FACTORY_struct::strings.

Referenced by antlr3StringFactoryNew().

⭐ pANTLR3_UINT8 insert8 (pANTLR3_STRING string, ANTLR3_UINT32 point, const char * newbit) [static]

References ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_struct::size.

Referenced by stringInit8().

⭐ pANTLR3_UINT8 inserti8 (pANTLR3_STRING string, ANTLR3_UINT32 point, ANTLR3_INT32 i) [static]

Referenced by stringInit8().

⭐ pANTLR3_UINT8 insertiUTF16 (pANTLR3_STRING string, ANTLR3_UINT32 point, ANTLR3_INT32 i) [static]

Referenced by stringInitUTF16().

⭐ pANTLR3_UINT8 insertS (pANTLR3_STRING string, ANTLR3_UINT32 point, pANTLR3_STRING newbit) [static]

References ANTLR3_STRING_struct::chars.

Referenced by stringInit8(), and stringInitUTF16().

⭐ pANTLR3_UINT8 insertUTF16_8 (pANTLR3_STRING string, ANTLR3_UINT32 point, const char * newbit) [static]

References ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_struct::size.

Referenced by stringInitUTF16().


ok bestie that's the end of part 1 β€” there is so much more coming, so hold onto your 8-bit and UTF16 hats. πŸŽ€πŸ¦‹

pANTLR3_UINT8 insertUTF16_UTF16 (pANTLR3_STRING string, ANTLR3_UINT32 point, const char * newbit) [static]

First, determine the length of the input string. okay bestie, that’s the whole note. πŸ’…

  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_struct::size.
  • Referenced by: stringInitUTF16().

pANTLR3_STRING newPtr8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr, ANTLR3_UINT32 size) [static]

Creates a new 8 bit string initialized with the 8 bit characters at the supplied ptr, of pre-determined size. slay ✨

  • Parameters:
    • factory β€” Pointer to the string factory that owns the strings
    • ptr β€” Pointer to 8 bit encoded characters
  • Returns: pointer to the new string
  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_FACTORY_struct::newSize, and size().
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING newPtrUTF16_8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr, ANTLR3_UINT32 size) [static]

Creates a new UTF16 string initialized with the 8 bit characters at the supplied 8 bit character ptr, of pre-determined size. it’s giving β€œglow up from 8-bit” πŸ’–

  • Parameters:
    • factory β€” Pointer to the string factory that owns the strings
    • ptr β€” Pointer to 8 bit encoded characters
  • Returns: pointer to the new string
  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_FACTORY_struct::newSize, and size().
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING newPtrUTF16_UTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr, ANTLR3_UINT32 size) [static]

Creates a new UTF16 string initialized with the UTF16 characters at the supplied ptr, of pre-determined size. no cap, it’s just UTF16 in, UTF16 out. πŸ¦‹

  • Parameters:
    • factory β€” Pointer to the string factory that owns the strings
    • ptr β€” Pointer to UTF16 encoded characters
  • Returns: pointer to the new string
  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_FACTORY_struct::newSize, and size().
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING newRaw8 (pANTLR3_STRING_FACTORY factory) [static]

ngl this one’s a little shy β€” no description, just receipts. πŸ™ˆ

  • Parameters: factory
  • Returns: (blank in the original β€” the manpage leaves it empty, bestie 😭)
  • References: ANTLR3_CDECL, ANTLR3_TRUE, ANTLR3_STRING_FACTORY_struct::index, ANTLR3_VECTOR_struct::set, stringFree(), stringInit8(), and ANTLR3_STRING_FACTORY_struct::strings.
  • Referenced by: antlr3StringFactoryNew(), and to8_UTF16().

pANTLR3_STRING newRawUTF16 (pANTLR3_STRING_FACTORY factory) [static]

Another mysterious icon. no description, but the cross-references are serving. πŸ’…

  • Parameters: factory
  • Returns: (blank in the original)
  • References: ANTLR3_CDECL, ANTLR3_TRUE, ANTLR3_STRING_FACTORY_struct::index, ANTLR3_VECTOR_struct::set, stringFree(), stringInitUTF16(), and ANTLR3_STRING_FACTORY_struct::strings.
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING newSize8 (pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size) [static]

Creates a new string with enough capacity for size 8 bit characters plus a terminator. room for the girls and the null byte. πŸŽ€

  • Parameters:
    • factory β€” Pointer to the string factory that owns strings
    • size β€” In characters
  • Returns: pointer to the new string.
  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_FACTORY_struct::newRaw, and size().
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING newSizeUTF16 (pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size) [static]

Creates a new string with enough capacity for size UTF16 characters plus a terminator. and yes, the original literally says: In characters (count double for surrogate pairs!!!) β€” not me yelling, the manpage is yelling. 😭

  • Parameters:
    • factory β€” Pointer to the string factory that owns strings
    • size β€” In characters (count double for surrogate pairs!!!)
  • Returns: pointer to the new string.
  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_FACTORY_struct::newRaw, and size().
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING newStr8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr) [static]

Create a new 8 bit string from the supplied, null terminated, 8 bit string pointer. classic. iconic. 8-bit. πŸ’–

  • Parameters:
    • factory β€” Pointer to the string factory that owns strings.
    • ptr β€” Pointer to the 8 bit encoded string
  • Returns: Pointer to the newly initialized string
  • References: ANTLR3_STRING_FACTORY_struct::newPtr8.
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING newStrUTF16_8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr) [static]

Create a new UTF16 string from the supplied, null terminated, 8 bit string pointer. it’s giving β€œ8-bit to UTF16 pipeline” ✨

  • Parameters:
    • factory β€” Pointer to the string factory that owns strings.
    • ptr β€” Pointer to the 8 bit encoded string
  • Returns: POinter to the newly initialized string (yes, capital P-O β€” preserving the typo, bestie 😭)
  • References: ANTLR3_STRING_FACTORY_struct::newPtr8.
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING newStrUTF16_UTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr) [static]

Create a new UTF16 string from the supplied, null terminated, UTF16 string pointer. full UTF16 energy. πŸ‘‘

  • Parameters:
    • factory β€” Pointer to the string factory that owns strings.
    • ptr β€” Pointer to the UTF16 encoded string
  • Returns: Pointer to the newly initialized string

First, determine the length of the input string

  • References: ANTLR3_STRING_FACTORY_struct::newPtr.
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING printable8 (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string) [static]

No description in the original β€” just vibes and references. πŸ™ˆ

  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_FACTORY_struct::newSize.
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_STRING printableUTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string) [static]

Same energy as printable8, but make it UTF16. πŸ’…

  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::len, and ANTLR3_STRING_FACTORY_struct::newSize.
  • Referenced by: antlr3StringFactoryNew().

pANTLR3_UINT8 set8 (pANTLR3_STRING string, const char * chars) [static]

No description, just the receipts. 🧾✨

  • References: ANTLR3_STRING_struct::chars, and ANTLR3_STRING_struct::size.
  • Referenced by: stringInit8().

pANTLR3_UINT8 setS (pANTLR3_STRING string, pANTLR3_STRING chars) [static]

Another one serving silent but referenced. πŸ’…

  • References: ANTLR3_STRING_struct::chars.
  • Referenced by: stringInit8(), and stringInitUTF16().

pANTLR3_UINT8 setUTF16_8 (pANTLR3_STRING string, const char * chars) [static]

No description in the original, but the cross-refs are loud. πŸ”₯

  • References: ANTLR3_STRING_struct::chars, and ANTLR3_STRING_struct::size.
  • Referenced by: stringInitUTF16().

pANTLR3_UINT8 setUTF16_UTF16 (pANTLR3_STRING string, const char * chars) [static]

First, determine the length of the input string. that’s the note. periodt. πŸ’…

  • References: ANTLR3_STRING_struct::chars, and ANTLR3_STRING_struct::size.
  • Referenced by: stringInitUTF16().

void ANTLR3_CDECL stringFree (pANTLR3_STRING string) [static]

Free the string, bestie. no description beyond the references, but the name says it all. 🫢

  • References: ANTLR3_CDECL, and ANTLR3_STRING_struct::chars.
  • Referenced by: newRaw8(), and newRawUTF16().

void stringInit8 (pANTLR3_STRING string) [static]

  • Parameters: string
  • Returns: (blank in the original)
  • References: addc8(), addi8(), ANTLR3_ENC_8BIT, append8(), appendS(), charAt8(), compare8(), compareS(), insert8(), inserti8(), insertS(), set8(), setS(), subString8(), to8_8(), toInt32_8(), and toUTF8_8().
  • Referenced by: newRaw8().

void stringInitUTF16 (pANTLR3_STRING string) [static]

  • Parameters: string
  • Returns: (blank in the original)
  • References: addcUTF16(), addiUTF16(), ANTLR3_ENC_8BIT, appendS(), appendUTF16_8(), appendUTF16_UTF16(), charAtUTF16(), compareS(), compareUTF16_8(), compareUTF16_UTF16(), insertiUTF16(), insertS(), insertUTF16_8(), insertUTF16_UTF16(), setS(), setUTF16_8(), setUTF16_UTF16(), subStringUTF16(), to8_UTF16(), toInt32_UTF16(), and toUTF8_UTF16().
  • Referenced by: newRawUTF16().

void stringInitUTF8 (pANTLR3_STRING string) [static]

  • Parameters: string
  • Returns: TODO: Implement UTF-8 β€” yeah, it’s a todo. we’re waiting. 😭

pANTLR3_STRING subString8 (pANTLR3_STRING string, ANTLR3_UINT32 startIndex, ANTLR3_UINT32 endIndex) [static]

No description, but the references are giving substring teas. βœ‚οΈβœ¨

  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::factory, ANTLR3_STRING_struct::len, and ANTLR3_STRING_FACTORY_struct::newPtr.
  • Referenced by: stringInit8().

pANTLR3_STRING subStringUTF16 (pANTLR3_STRING string, ANTLR3_UINT32 startIndex, ANTLR3_UINT32 endIndex) [static]

UTF16 substring energy. same refs, different encoding. πŸ’–

  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::factory, ANTLR3_STRING_struct::len, and ANTLR3_STRING_FACTORY_struct::newPtr.
  • Referenced by: stringInitUTF16().

pANTLR3_STRING to8_8 (pANTLR3_STRING string) [static]

No description, just one reference. it’s short, it’s sweet, it’s to8_8. πŸ’…

  • Referenced by: stringInit8().

pANTLR3_STRING to8_UTF16 (pANTLR3_STRING string) [static]

No description, but the references are stacked. πŸ”₯

  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::factory, ANTLR3_STRING_struct::len, newRaw8(), and ANTLR3_STRING_struct::size.
  • Referenced by: stringInitUTF16().

ANTLR3_INT32 toInt32_8 (pANTLR3_STRING string) [static]

No description, just referenced by stringInit8(). simple. clean. ✨

  • Referenced by: stringInit8().

ANTLR3_INT32 toInt32_8 (struct ANTLR3_STRING_struct * string) [static]

A second toInt32_8 with a different signature β€” the manpage said β€œand another one.” πŸ’…

  • References: ANTLR3_STRING_struct::chars.

ANTLR3_INT32 toInt32_UTF16 (pANTLR3_STRING string) [static]

No description, but the refs are ANTLR3_API and ANTLR3_CDECL. fancy. πŸ‘‘

  • References: ANTLR3_API, and ANTLR3_CDECL.
  • Referenced by: stringInitUTF16().

ANTLR3_INT32 toInt32_UTF16 (struct ANTLR3_STRING_struct * string) [static]

Another UTF16 toInt32, another signature. the duality. πŸ¦‹

  • References: ANTLR3_FALSE, ANTLR3_TRUE, and ANTLR3_STRING_struct::chars.

pANTLR3_STRING toUTF8_8 (pANTLR3_STRING string) [static]

No description, but it’s got the newPtr reference and it’s referenced by stringInit8(). slay. πŸ’…

  • References: ANTLR3_STRING_struct::chars, ANTLR3_STRING_struct::factory, ANTLR3_STRING_struct::len, and ANTLR3_STRING_FACTORY_struct::newPtr.
  • Referenced by: stringInit8().

pANTLR3_STRING toUTF8_UTF16 (pANTLR3_STRING string) [static]

This one’s got the whole conversion squad: ConvertUTF16toUTF8(), lenientConversion, and more. it’s giving β€œUTF16 to UTF8 main character energy.” 🌈

  • References: ANTLR3_UINT32_CAST, ANTLR3_STRING_struct::chars, ConvertUTF16toUTF8(), ANTLR3_STRING_struct::factory, ANTLR3_STRING_struct::len, lenientConversion, ANTLR3_STRING_FACTORY_struct::newStr8, and ANTLR3_STRING_struct::size.
  • Referenced by: stringInitUTF16().

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for ANTLR3C from the source code.


k byeeee bestie πŸ’… this was version 3.3.1, dated Tue Jul 29 2025 00:00:00, from src/antlr3string.c(3) β€” mwah πŸ’‹

πŸ“¦ where this page comes from