wofi-utils(3)
β¨ NAME β¨
okay so bestie, this is wofi β the utility functions page, aka the little grab-bag of helper functions that the rest of wofi leans on. Consider this your documentation era. π
πΈ DESCRIPTION πΈ
The functions documented here are general utility functions. They're all defined in utils.h, so if you're out here trying to use them, that's the header you're gonna want to include. No cap. π«Ά
π UTILITY FUNCTIONS π
These are the general convenience functions, and they are literally so convenient. Every single one, listed below, no skips. β¨
time_t utils_get_time_millis(void)
Returns the current unix time in milliseconds. That's it, that's the whole function, and honestly? Iconic. β±οΈ
void utils_sleep_millis(time_t millis)
Sleeps for the specified amount of time. Like a lil nap for your program. π΄
time_t millisβ The time to sleep for in milliseconds.
char* utils_concat(size_t arg_count, ...)
Concatenates strings together. Glues 'em. π«
β οΈ The returned result is newly allocated and must be freed by the caller when finished using it. Not me letting you leak memory... free it bestie, I'm begging. π
size_t arg_countβ The number of arguments provided.varargsβ The list of strings to be concatenated.
size_t utils_min(size_t n1, size_t n2)
Returns the smaller of the two inputs. Two numbers walk in, the smol one walks out. π
size_t n1β The first number.size_t n2β The second number.
size_t utils_min3(size_t n1, size_t n2, size_t n3)
Returns the smallest of the three inputs. It's giving the min function but with a third wheel. π
size_t n1β The first number.size_t n2β The second number.size_t n3β The third number.
size_t utils_distance(const char* haystack, const char* needle)
Computes the Levenshtein distance between the two inputs. Yes queen, fuzzy matching energy β how far apart are these two strings really. π₯
const char* haystackβ The string to search in.const char* needleβ The string to search for.
and that's the whole page, bestie, you made it to the end π this lil slice of the Library Functions Manual lives at wofi-utils(3) β go forth and call these functions, and don't forget to free your strings. mwah. ππ¦β¨
π¦ where this page comes from
- alpine 3.24: wofi-doc 1.5.3-r0 Β· GPL-3.0-only
- arch rolling: wofi 1.5.3-1 Β· GPL-3.0-or-later
- debian bookworm: wofi 1.3-1 Β· GPL-3.0-or-later
- debian trixie: wofi 1.4.1-1+b2 Β· GPL-3.0-or-later
- fedora 43: wofi-devel 1.4.1-7.fc43 Β· GPL-3.0-only
- fedora 43: wofi-devel 1.4.1-7.fc43 Β· GPL-3.0-only
- fedora 43: wofi-devel 1.5.3-1.fc43 Β· GPL-3.0-only
- fedora 43: wofi-devel 1.5.3-1.fc43 Β· GPL-3.0-only
- fedora 44: wofi-devel 1.5.3-2.fc44 Β· GPL-3.0-only
- fedora 44: wofi-devel 1.5.3-2.fc44 Β· GPL-3.0-only
- nixos 26.05: wofi 1.5.3
- nixpkgs unstable: wofi 1.5.3
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- opensuse-leap 16.0: wofi 1.4.1-bp160.1.13 Β· GPL-3.0-only
- ubuntu jammy: wofi 1.2.4-1 Β· GPL-3.0-or-later
- ubuntu noble: wofi 1.4.1-1build2 Β· GPL-3.0-or-later
- ubuntu questing: wofi 1.4.1-1build2
- ubuntu resolute: wofi 1.5.1-1 Β· GPL-3.0-or-later
- ubuntu stonking: wofi 1.5.3-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms