---
name: "wofi-utils"
section: "3"
platform: "linux"
package: "wofi"
version: "1.5.3-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/wofi-utils"
---

# wofi-utils(3)

Utility functions and documentation

## 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.

- **time\_t utils\_get\_time\_millis(void)**

  Returns the current unix time in milliseconds.

- **void utils\_sleep\_millis(time\_t millis)**

  Sleeps for the specified amount of time.

  **time\_t millis** - The time to sleep for in milliseconds.

- **char\* utils\_concat(size\_t arg\_count, ...)**

  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.

- **size\_t utils\_min(size\_t n1, size\_t n2)**

  Returns the smaller of the two inputs.

  **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.

  **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.

  **const char\* haystack** - The string to search in.

  **const char\* needle** - The string to search for.
