unibi_var_from_num(3)

πŸ’– unibi_var_from_num β€” bestie's guide to wrapping ur lil values πŸ’–

okay so this is a page from unibilium (the manual name, for the record β€” we're in section 3, the library girlies 🫢) and it's all about unibi_var_from_num, unibi_num_from_var, unibi_str_from_var, and unibi_var_from_str. yes that's a lot of similar-looking names, no i will not apologise, we're doing this together πŸ’…


✨ NAME ✨

unibi_num_from_var, unibi_str_from_var, unibi_var_from_num, unibi_var_from_str β€” create and inspect unibi_var_t values 🌸

like... it's giving "make a var, look inside a var". the whole vibe, honestly.


🌈 SYNOPSIS 🌈

#include <unibilium.h>

int         unibi_num_from_var(unibi_var_t v);
const char *unibi_str_from_var(unibi_var_t v);

unibi_var_t unibi_var_from_num(int i);
unibi_var_t unibi_var_from_str(char *s);

look at them. four lil guys. two of them wrap stuff up, two of them peek inside. iconic behavior fr fr ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so unibi_var_from_num and unibi_var_from_str are the wrappers. they take the int or the string you hand them and tuck it all cozy inside a unibi_var_t object. why? because that's the currency you need for unibi_format(3) and unibi_run(3). no wrapper, no entry. periodt. πŸŽ€

then on the flip side you got unibi_num_from_var(v) β€” that one returns the number stored in v, and v must have been constructed by unibi_var_from_num. likewise unibi_str_from_var(v) returns the string stored in v, and v must have been constructed by unibi_var_from_str. match made in heaven, one-to-one, no crossovers. πŸ’œ

πŸ’€ and here's the part where u have to behave: it is an error to pass a wrapped string to unibi_num_from_var, or a wrapped number to unibi_str_from_var. like, do not. that's not a vibe. that's a bug. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

go read those too bestie, they're the whole reason this wrapper stuff exists πŸ’…


and that's the page!! mwah πŸ’– this was unibilium-2.1.4, dated 2026-09-07 β€” shoutout to the unibilium girlies for keeping the docs cute. now go wrap ur ints responsibly. slay. βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from