NNG_STAT_STRING(3)

πŸ“¦
version 1.12.0 Β· 4 versions
, in ubuntu stonking

πŸ’– NNG_STAT_STRING(3) β€” nng_stat_string πŸ’–

okay bestie, so this one lives in the NNG Reference Manual and it's literally the glow-up your stats snapshot deserves. it's called nng_stat_string, and no cap, it's about to hand you a string. πŸŽ€


✨ NAME ✨

nng_stat_string β€” bestie, it gets the statistic string value πŸ¦‹

✨ SYNOPSIS ✨

#include <nng/nng.h>

typedef struct nng_stat nng_stat;

const char *nng_stat_string(nng_stat *stat);

she's simple, she's clean, she's iconic πŸ’…

✨ DESCRIPTION ✨

so nng_stat_string() returns a string value for the statistic stat, and stat must be of type NNG_STAT_STRING (go peek at nng_stat_type(3) if you need the receipts, iykyk).

now listen β€” if the statistic is not of type NNG_STAT_STRING, then NULL gets returned. that's it. that's the whole vibe check, and it failed. πŸ™ˆ

note bestie 🫢 β€” the string you get back is valid until nng_stats_free() is called to free the memory for the snapshot. so like… use it, love it, don't hold onto it after the free, fr fr. it's giving borrowed, not given. 😭

✨ RETURN VALUES ✨

the string value associated with stat! πŸŽ‰ or NULL if the statistic is not a string type. that's literally the whole menu, bestie. no surprises, no drama. ✨

✨ ERRORS ✨

None. zero. zilch. not a single one. she doesn't miss. πŸ’€πŸ‘‘

✨ SEE ALSO ✨


okay so that's the whole page, and honestly? obsessed. 🌸 go read the linked ones, they're all in the same friend group. 🧚

NNG Reference Manual Β· version date 2026-06-30 Β· NNG_STAT_STRING(3) β€” mwah, periodt πŸ’‹πŸ’œ

πŸ“¦ where this page comes from