1
0
Fork 0
forked from fun/fun
fun/web/documentation/stdlib/stdlib.md

3.6 KiB

layout published noToc noComments noDate title subtitle description permalink lang tags
page true false false false Standard Library Overview Overview of the standard library modules under ./lib with one-line summaries. Overview of the standard library modules under ./lib with one-line summaries. /documentation/stdlib/ en
lib
library
line
modules
one
standard
summaries
under

This page provides a quick orientation to the standard library located under https://git.xw3.org/fun/fun/src/branch/main/lib{:class="git"}.

The stdlib is written in Fun and organized by domain. Below is the current layout with brief notes. Refer to the source for full APIs and examples.

Top-level modules

  • arrays.fun - helpers for working with array structures.
  • cli.fun - minimal helpers for building CLI tools.
  • hello.fun - simple demonstration helper(s).
  • hex.fun - hexadecimal encode/decode helpers.
  • math.fun - math helpers in Fun.
  • regex.fun - simple regex-related helpers (see also regex/).
  • strings.fun - string manipulation utilities.

Packages

Note: Availability of some modules can depend on optional extensions selected at build time (see Build). For instance, regex/pcre2.fun requires PCRE2 support; ui/* depends on chosen UI backends.

Using modules

#include <strings.fun>

s = trim("  hello  ")
print(s)

For search paths and namespacing details, see Includes and CLI (FUN_LIB_DIR and DEFAULT_LIB_DIR).