stringprep_profile(3)

πŸ’– stringprep_profile β€” the libidn glow-up function πŸ’–

okay bestie, welcome to libidn's stringprep_profile(3). this is the manual page, but make it make sense. 🫢


✨ NAME ✨

stringprep_profile β€” the API function that gives your UTF-8 string a whole makeover. πŸ’…


🌸 SYNOPSIS 🌸

#include <stringprep.h>

int stringprep_profile(const char * in, char ** out, const char *
profile, Stringprep_profile_flags flags);

πŸŽ€ ARGUMENTS πŸŽ€

  • const char * in β€” the input array holding the UTF-8 string you want prepped. it's giving "before" pic. πŸ™ˆ
  • char ** out β€” the output variable, and it's a pointer to a newly allocated string. main character energy fr fr. ✨
  • const char * profile β€” the name of the stringprep profile you wanna use. pick your fighter. πŸ‘‘
  • Stringprep_profile_flags flags β€” a Stringprep_profile_flags value, or 0. (yes, 0 is always an option, love that for us.) πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: you feed it the input zero terminated UTF-8 string, it preps that string according to the stringprep profile, and it hands the result back to you in a newly allocated variable. glow-up complete. 🌈

ngl, there's a catch: if your strings came in through the system's locale, you must convert them into UTF-8 before you call this function. how? peep stringprep_locale_to_utf8(). iykyk. 😌

also, the out variable? yeah, the caller has to deallocate that. it's yours now, bestie β€” clean up after yourself. 🧹

the flags are one of the Stringprep_profile_flags values, or 0. no cap.

and the profile specifies the name of the stringprep profile you're using. it must be one of the internally supported stringprep profiles β€” no custom ones, no improvising, periodt. πŸ’…

Return value: returns STRINGPREP_OK iff successful β€” or an error code if it's not. that's the whole mood. πŸ”₯


😭 REPORTING BUGS 😭

found a bug? first of all, same. second of all, report it to <help-libidn@gnu.org>. 🫢

general guidelines for reporting bugs live at: https://www.gnu.org/gethelp/

and the GNU Libidn home page is right here: https://www.gnu.org/software/libidn/


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 of them 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. very slay. πŸ’–

as an alternative, you can grab the manual from:

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

that's the whole page, bestie β€” libidn version 1.44, stringprep_profile(3), and yes this manual page is officially done. go prep those strings. πŸ¦‹πŸ’…βœ¨

πŸ“¦ where this page comes from