Scroll to navigation

wofi-utils(3) Library Functions Manual wofi-utils(3)

NAME

wofi - Utility functions and documentation

DESCRIPTION

The functions documented here are general utility functions. They are defined in utils.h.

UTILITY FUNCTIONS

The following functions are general convenience functions.

Returns the current unix time in milliseconds.

Sleeps for the specified amount of time.

time_t millis - The time to sleep for in milliseconds.

Concatenates strings together. The returned result is newly allocated and must be freed by the caller when finished using it.

size_t arg_count - The number of arguments provided

varargs - The list of strings to be concatenated.

Returns the smaller of the two inputs.

size_t n1 - The first number.

size_t n2 - The second number.

Returns the smallest of the three inputs.

size_t n1 - The first number.

size_t n2 - The second number.

size_t n3 - The third number.

Computes the Levenshtein distance between the two inputs.

const char* haystack - The string to search in.

const char* needle - The string to search for.