unibi_var_from_str(3)

πŸ’– unibi_var_from_str β€” create and inspect unibi_var_t values πŸ’–

okay bestie, welcome to unibilium (that's the manual we're in, mwah) β€” this page is literally all about making lil wrapped-up values and then peeking inside them. it's giving ✨packaging✨. let's go 🫢


🌸 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);

like. four functions. four. that's the whole vibe. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so unibi_var_from_num and unibi_var_from_str are the little wrappers β€” they take the int or the string you hand them and tuck it inside a unibi_var_t object, all cozy, so you can then use it in unibi_format(3) and unibi_run(3). it's giving gift-wrapping for terminal data πŸŽ€

then for the un-wrapping era:

  • unibi_num_from_var(v) β€” hands you back the number that's stored in v. heads up: v must have been constructed by unibi_var_from_num. no substitutions, bestie.
  • unibi_str_from_var(v) β€” hands you back the string that's stored in v. and v must have been constructed by unibi_var_from_str. same energy, different type.
🚨 and here's the part where you gotta be careful, fr fr: it is an error to pass a wrapped string to unibi_num_from_var, or a wrapped number to unibi_str_from_var. that's a type mismatch and the universe will simply not have it. no cap. don't do it. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, you ate that πŸ’…βœ¨ this was unibilium-2.1.4, dated 2026-09-07 β€” yeah she's from the future, iconic behavior, we don't question it. go forth and wrap your values responsibly πŸ¦‹πŸ’–πŸŒΈ

πŸ“¦ where this page comes from