TICKIT_STRING_NEW(3)

πŸ’– NAME πŸ’–

tickit_string_new β€” bestie, we're making a counted string ✨


🌸 SYNOPSIS 🌸

#include <tickit.h>

TickitString *tickit_string_new(const char *str, size_t len);

Link with -ltickit.


πŸŽ€ DESCRIPTION πŸŽ€

okay so. tickit_string_new() creates a brand-new TickitString instance, and it gets initialised with the contents of the string buffer you hand it. that's it, that's the whole vibe πŸ¦‹

The reference count of a freshly-constructed string instance? it's one. iconic. and you can bump it up or bring it down with tickit_string_ref(3) and tickit_string_unref(3). the way that when its reference count hits zero it gets destroyed πŸ’€ β€” yeah, that's the lifecycle, no cap.

not me reminding you that this is a counted string, so like… mind the count bestie πŸ™ˆ

⭐ RETURN VALUE ⭐

If it all goes well, tickit_string_new() returns a pointer to the new instance. slay πŸ‘‘


🌈 SEE ALSO 🌈


so this page lives in the Library Functions Manual, and it's literally called TICKIT_STRING_NEW(3) β€” that's the name up top and the name at the very bottom, so you always know where you are 🫢 no date on this one, just the title holding it down at both ends. mwah πŸ’