RTF_GET_VERSION(3)

✨ NAME ✨

rtf_get_version β€” bestie, this one hands you the version of the library, like a little glow-up receipt πŸ’–


🌸 SYNOPSIS 🌸

#include <rtfilter.h>

size_t rtf_get_version(char *string, size_t len, unsigned int line);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you call this function and, if line is 0, it fills in string with the version of the library. slay. that's the main character info right there πŸ‘‘

it fills at most len characters in string, and yes bestie that count includes the terminating null byte (' ') β€” the NUL is invited to the party too, no gatekeeping.

now here's the plot twist 🌈 if the implementation of the library depends on other non-standard libraries, it will return the version of those in the subsequent lines β€” that's line > 0, one dependency per line, very organized of them honestly.

and if there is no more dependency left? nothing gets copied onto string, and the function returns 0. that's it, that's the whole vibe, the list is done πŸ’…


πŸŽ€ RETURN VALUE πŸŽ€

it returns the number of characters copied onto string. that's the number, that's the tea πŸ“


lowkey iconic of EPFL to ship this back in 2010 with the rtfilter library β€” anyway bestie, that's RTF_GET_VERSION(3) wrapped, go read the version string, mwah 🫢✨

πŸ“¦ where this page comes from