PCRE_UTF32_TO_HOST_BYTE_ORDER(3)

✨ NAME ✨

PCRE - Perl-compatible regular expressions πŸ’–

okay bestie, this is the manual page for PCRE_UTF32..._BYTE_ORDER(3), from the Library Functions Manual. it's giving very specific 32-bit energy, and we're lowkey obsessed. πŸŽ€


🌸 SYNOPSIS 🌸

       #include <pcre.h>

       int pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *output,
            PCRE_SPTR32 input, int length, int *host_byte_order,
            int keep_boms);

πŸ’… DESCRIPTION πŸ’…

okay so this function (pcre32_utf32_to_host_byte_order, if you're keeping track) exists only in the 32-bit library, no cap. it converts a UTF-32 string to the correct order for the current host, and it's literally taking account of any byte order marks (BOMs) inside the string. iconic behavior, fr fr. πŸ¦‹

Its arguments are:

  • output β€” pointer to output buffer, may be the same as input ✨
  • input β€” pointer to input buffer 🫢
  • length β€” number of 32-bit units in the input, or negative for a zero-terminated string πŸ’€
  • host_byte_order β€” a NULL value or a non-zero value pointed to means start in host byte order πŸ‘‘
  • keep_boms β€” if non-zero, BOMs are copied to the output string 🌈

The result of the function is the number of 32-bit units placed into the output buffer, including the zero terminator if the string was zero-terminated. periodt. πŸ’…

If host_byte_order is not NULL, it is set to indicate the byte order that is current at the end of the string. highkey useful. πŸ”₯

There is a complete description of the PCRE native API in the pcreapi page and a description of the POSIX API in the pcreposix page. iykyk. πŸ’œ


mwah πŸ’‹ this page is from PCRE 8.30, dated 24 June 2012, and the footer name is PCRE_UTF32..._BYTE_ORDER(3). stay slaying, bestie. πŸŽ€