tld_check_4t(3)

✨ tld_check_4t(3) ✨

okay bestie, welcome to libidn β€” the manual page for tld_check_4t, and yes we're doing this together, no you're not reading it alone πŸ’–


πŸŽ€ NAME πŸŽ€

tld_check_4t β€” it's literally an API function, that's the whole name, periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <tld.h>

int tld_check_4t(const uint32_t * in, size_t inlen, size_t * errpos,
       const Tld_table * tld);

look at her. she's giving very much "one function, four arguments, zero drama" 🌸


πŸ’… ARGUMENTS πŸ’…

  • const uint32_t * in β€” the array of unicode code points you wanna process, bestie. and listen: it does not need to be zero terminated, so don't come for me with that null byte, she doesn't need it πŸ™ˆ
  • size_t inlen β€” how many unicode code points are in there. the count. the receipts. the number. πŸ”’
  • size_t * errpos β€” this is where the position of the offending character gets returned. like, she's gonna snitch on exactly where the problem is, and she's putting it right here ✨
  • const Tld_table * tld β€” a Tld_table data structure representing the restrictions that your input is getting tested against. the rulebook, basically πŸ‘‘

🌈 DESCRIPTION 🌈

so what she does is: she tests each and every one of the code points in in to see whether they're allowed by the data structure in tld, and then she returns the position of the first character for which that is not the case in errpos. first offender gets named, fr fr πŸ’€

Return value: she returns the Tld_rc value TLD_SUCCESS if all the code points are valid, or when tld is null (yes, null is a vibe, she lets it slide 🫢). She returns TLD_INVALID if a character is not allowed, or additional error codes on general failure conditions. so like, if it's not one of those two, it's one of the extra ones, iykyk.


😭 REPORTING BUGS 😭

found a bug? don't be shy, tell the people:


Copyright Β© 2002-2026 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. (iconic behaviour honestly, no royalties, just vibes πŸ’œ)


⭐ SEE ALSO ⭐

The full documentation for libidn is maintained as a Texinfo manual. If the info and libidn programs are properly installed at your site, the command

info libidn

should give you access to the complete manual. As an alternative you may obtain the manual from:

https://www.gnu.org/software/libidn/manual/

and that's the whole page, bestie!! this was libidn, version 1.44, and the manual page is tld_check_4t(3) β€” go forth and validate your code points, you absolute main character πŸ§šβœ¨πŸ’–

πŸ“¦ where this page comes from