tld_check_8z(3)

✨ tld_check_8z ✨

okay bestie, welcome to tld_check_8z(3) from the libidn girlies πŸ’– this is an API function and she is literally the vibe check for your domain name characters. let's get into it πŸ¦‹


🌸 NAME 🌸

tld_check_8z β€” API function. that's it, that's the name, she's serving function energy πŸ‘‘


✨ SYNOPSIS ✨

#include <tld.h>

int tld_check_8z(const char * in, size_t * errpos, const Tld_table **
overrides);

yes the line break in the middle of overrides is real, we don't question the ancestors 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * in β€” a zero-terminated UTF8 string to process. that's the string you're putting on blast, bestie.
  • size_t * errpos β€” the position of the offending character gets returned right here. she's the receipts πŸ“
  • const Tld_table ** overrides β€” a Tld_table array of extra domain restriction structures that complement and supersede the built-in info. like, they show up AND they outrank. main character behavior fr fr πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

so what does she actually do? she tests each of the characters in in and checks whether they're allowed by the info in overrides or by the built-in TLD restriction data. vibe check complete βœ…

the rules of the group chat:

  • when data for the same TLD is available both internally and in overrides, the info in overrides takes precedence. periodt.
  • if several entries for a specific TLD are found, the first one is used. first come first served, no cap.
  • if overrides is NULL, only the built-in information is used. she's solo dolo 🧚

the position of the first offending character gets returned in errpos. and hear me on this one bestie:

⚠️ note that the error position refers to the decoded character offset, not the byte position in the string. do not come for me with byte math, it's giving wrong answer 😭

Return value: she returns the Tld_rc value TLD_SUCCESS if all characters are valid or when tld is null (slay), TLD_INVALID if a character is not allowed (not slay), or additional error codes on general failure conditions (also not slay, sorry babe πŸ’€).


😭 REPORTING BUGS 😭

found a bug? don't suffer in silence, tell the devs:


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. generous queen behavior honestly 🌈


πŸ¦‹ 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, this 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, page tld_check_8z(3), and she ate, no crumbs. go validate those characters, ily, bye 🫢✨🌸

πŸ“¦ where this page comes from