tld_get_4(3)
π tld_get_4 β the libidn glow-up π
okay bestie, sit DOWN because we're talking about tld_get_4(3) from libidn, and she is lowkey doing the most important job in the whole DNS-adjacent friend group: she finds your top-level domain and hands it to you. main character energy, no cap. β¨
πΈ NAME πΈ
tld_get_4 β an API function. that's it, that's the girl. she's an API function and she knows it. π
β¨ SYNOPSIS β¨
#include <tld.h>
int tld_get_4(const uint32_t * in, size_t inlen, char ** out);
look at her. three args, one job, zero drama. iconic.
π ARGUMENTS π
const uint32_t * inβ the array of unicode code points you want processed. and bestie, real talk: she does NOT need to be zero terminated. she's flexible like that. π¦size_t inlenβ how many unicode code points you're feeding her. just the count. that's the whole vibe.char ** outβ a pointer to your zero terminated ascii result string. this is where she drops the answer. π«Ά
π DESCRIPTION π
so here's the tea: she isolates the top-level domain of in and returns it as an ASCII string in out. that's the entire plot. no subplots, no filler episode. π
Return value: she gives you TLD_SUCCESS when everything slays, or the corresponding Tld_rc error code when it does not slay. either way she's honest about it. π
π REPORTING BUGS π
found a bug? not me being the one to tell you, but you gotta report it to <help-libidn@gnu.org>. π
the general guidelines for reporting bugs live at: https://www.gnu.org/gethelp/
and the GNU Libidn home page, which is very much the group chat hub, is at: https://www.gnu.org/software/libidn/
π COPYRIGHT π
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. (yes bestie, keep the receipts. always keep the receipts. π )
π 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. the way that info command just works... obsessed. β¨
as an alternative you may obtain the manual from:
https://www.gnu.org/software/libidn/manual/
and that's the whole page, bestie!! this one shipped with libidn 1.44 β go forth, isolate those top-level domains, and remember: zero termination is optional but self-care is mandatory. mwah. π«Άππ
π¦ where this page comes from
- arch rolling: libidn 1.44-1 Β· GPL3 AND LGPL
- epel 10: libidn-devel 1.44-1.el10_3 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 43: libidn-devel 1.44-1.fc43 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 43: libidn-devel 1.44-1.fc43 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 44: libidn-devel 1.44-1.fc44 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- fedora 44: libidn-devel 1.44-1.fc44 Β· (LGPL-3.0-or-later OR GPL-2.0-or-later) AND GPL-3.0-or-later AND GFDL-1.3-or-later
- ubuntu stonking: libidn-dev 1.44-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms