unibi_get_str(3)

✨ unibi_get_str β€” get/set terminal capabilities (unibilium edition) πŸ’–

okay bestie, sit down, hydrate, because we're about to talk about unibilium β€” that's the manual, she's called unibilium and she's iconic. this page right here is unibi_get_str(3), but honestly she brought her whole friend group. 🫢


🌸 NAME 🌸

unibi_get_bool, unibi_set_bool, unibi_get_num, unibi_set_num, unibi_get_str, unibi_set_str β€” the six besties who access the capabilities of a terminal object. no cap, that's literally the whole job. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <unibilium.h>

int unibi_get_bool(const unibi_term *ut, enum unibi_boolean b);
void unibi_set_bool(unibi_term *ut, enum unibi_boolean b, int x);

int unibi_get_num(const unibi_term *ut, enum unibi_numeric n);
void unibi_set_num(unibi_term *ut, enum unibi_numeric n, int x);

const char *unibi_get_str(const unibi_term *ut, enum unibi_string s);
void unibi_set_str(unibi_term *ut, enum unibi_string s, const char *x);

look at them. so tidy. so structured. the way that #include <unibilium.h> is just sitting there at the top like the main character it is. ✨


πŸ’… DESCRIPTION πŸ’…

okay so here's the tea: these functions get and set boolean, numeric, and string capabilities. three flavors, all slaying in their own lane. 🌈

and now the important part, the part you gotta remember for the quiz:

  • absent numeric capabilities are represented as -1
  • absent string capabilities are represented as "NULL"

like, that's the whole vibe check right there. if a numeric capability ghosted you, you get -1. if a string capability ghosted you, you get "NULL". periodt. πŸ’€

okay now the WARNING, and bestie I need you to actually read this one: note that unibi_set_str simply stores the pointer it is given; it will not free x or make a copy of the string.

like, she's not copying anything, she's not cleaning up after you, she's just holding onto the pointer you handed her and trusting you with the rest. that's it. that's the deal. if you free x yourself afterwards, that's a you problem and the pointer is still pointing at a ghost. 🫣 so like, keep your string alive, okay?? πŸ₯Ί


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the page!! πŸ’œ go forth and get/set your capabilities, you absolute legend. 🌟

unibilium-2.1.4 Β· 2026-09-07 β€” mwah, sending you this from the group chat, bye bestie πŸŽ€πŸŒΈβœ¨

πŸ“¦ where this page comes from