ASON_ASPRINT(3)
π ASON_ASPRINT(3) π
okay bestie, welcome to the User Manuals corner of the group chat β today we're talking ason_asprint and ason_asprint_unicode, and honestly? they're giving "turn my fancy struct into a string" and I'm obsessed. β¨
πΈ NAME πΈ
ason_asprint, ason_asprint_unicode β besties who convert ason_t values into strings. fr fr, that's the whole job. π
β¨ SYNOPSIS β¨
#include <ason/ason.h>
#include <ason/print.h>
char *ason_asprint(ason_t *value);
char *ason_asprint_unicode(ason_t *value);
like. two includes. two functions. so clean, so iconic. π
π¦ DESCRIPTION π¦
okay so ason_asprint takes a value of type ason_t and turns it into a human readable textual ASON representation. that's it, that's the vibe. it's giving "I speak fluent struct". π
ason_asprint_unicode</purl> β wait, typo, ason_asprint_unicode β is literally the same thing, EXCEPT:
- the returned type is always UTF-8 encoded, no exceptions, no negotiations π«Ά
- and it makes full use of the character set, like it's wearing its best outfit to the function call π
meanwhile ason_asprint endeavors to be locale-safe β it's the friend who checks the group chat rules before posting. respectful. considerate. a little bit cautious. we love her for it. π
so like, one is the maximalist glam version, one is the "I will not embarrass you in front of your locale settings" version. both valid. both slay. π
π₯ RETURN VALUE π₯
all functions should always return a valid pointer to char *.
no cap. always valid. never null. never playing games with your feelings. π«Άβ¨
π SEE ALSO π
go read those too, iykyk ππ
π AUTHOR π
Casey Dahlin <casey.dahlin@gmail.com> β thank you for your service, legend π«‘π
and that's the whole page bestie!! main character energy from start to finish, no notes. this one came to you courtesy of Linux, dated JANUARY 2014 β yeah she's an elder but she ATE and she's still eating ππ β¨ mwah, bye!! π¦
π¦ where this page comes from
- fedora 43: libason-devel 0.1.2-27.fc43 Β· GPL-3.0-or-later
- fedora 43: libason-devel 0.1.2-27.fc43 Β· GPL-3.0-or-later
- fedora 44: libason-devel 0.1.2-28.fc44 Β· GPL-3.0-or-later
- fedora 44: libason-devel 0.1.2-28.fc44 Β· 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