{
  "modules": [
    {
      "name": "args",
      "source": "https://github.com/Londopy/nexium/blob/main/std/args.nx",
      "about": "",
      "functions": [
        {
          "name": "new",
          "signature": "pub fn new(argv: [][]u8) -> Parser",
          "doc": "Wrap `os.args()`; the program name in `argv[0]` is skipped."
        },
        {
          "name": "flag",
          "signature": "pub fn flag(self: *mut Self, long: []u8, short: []u8) -> bool",
          "doc": "True when the flag is present (any number of times)."
        },
        {
          "name": "count",
          "signature": "pub fn count(self: *mut Self, long: []u8, short: []u8) -> usize",
          "doc": "How many times the flag appears (`-vvv` counts as three)."
        },
        {
          "name": "option",
          "signature": "pub fn option(self: *mut Self, long: []u8, short: []u8) -> ?[]u8",
          "doc": "The value of `--name value`, `--name=value`, or `-n value`; the last one wins."
        },
        {
          "name": "options",
          "signature": "pub fn options(self: *mut Self, long: []u8, short: []u8) -> List([]u8)",
          "doc": "Every value of a repeatable option, in order."
        },
        {
          "name": "int_option",
          "signature": "pub fn int_option(self: *mut Self, long: []u8, short: []u8) -> !?i64",
          "doc": "An option parsed as an integer; `error.InvalidInput` when present but not a number."
        },
        {
          "name": "rest",
          "signature": "pub fn rest(self: *Self) -> List([]u8)",
          "doc": "Arguments not consumed by any query, plus everything after `--`."
        },
        {
          "name": "unknown_options",
          "signature": "pub fn unknown_options(self: *Self) -> List([]u8)",
          "doc": "Unconsumed arguments that look like options: the ones the program did not ask for."
        },
        {
          "name": "usage",
          "signature": "pub fn usage(program: []u8, summary: []u8, rows: [][]u8) -> String",
          "doc": "Render a usage line and option table from (flags, description) rows."
        },
        {
          "name": "env_map",
          "signature": "pub fn env_map() -> Map(String, String)",
          "doc": "The environment as a map, from `os.environ()`."
        }
      ]
    },
    {
      "name": "bytes",
      "source": "https://github.com/Londopy/nexium/blob/main/std/bytes.nx",
      "about": "",
      "functions": [
        {
          "name": "hex",
          "signature": "pub fn hex(data: []u8) -> String",
          "doc": "Lower-case hexadecimal, two characters per byte."
        },
        {
          "name": "unhex",
          "signature": "pub fn unhex(text: []u8) -> !String",
          "doc": "Bytes from hexadecimal text (either case, even length)."
        },
        {
          "name": "base64",
          "signature": "pub fn base64(data: []u8) -> String",
          "doc": "Standard base64 with `=` padding."
        },
        {
          "name": "unbase64",
          "signature": "pub fn unbase64(text: []u8) -> !String",
          "doc": "Bytes from standard base64 (padding optional)."
        },
        {
          "name": "fnv1a",
          "signature": "pub fn fnv1a(data: []u8) -> u32",
          "doc": "FNV-1a, 32 bits: a fast non-cryptographic hash."
        },
        {
          "name": "crc32",
          "signature": "pub fn crc32(data: []u8) -> u32",
          "doc": "CRC-32 (IEEE), as used by zip and PNG."
        },
        {
          "name": "read_u32_be",
          "signature": "pub fn read_u32_be(data: []u8, at: usize) -> u32",
          "doc": "Big-endian 32-bit read."
        },
        {
          "name": "read_u32_le",
          "signature": "pub fn read_u32_le(data: []u8, at: usize) -> u32",
          "doc": "Little-endian 32-bit read."
        },
        {
          "name": "write_u32_be",
          "signature": "pub fn write_u32_be(out: *mut String, v: u32)",
          "doc": "Append a big-endian 32-bit value."
        },
        {
          "name": "write_u32_le",
          "signature": "pub fn write_u32_le(out: *mut String, v: u32)",
          "doc": "Append a little-endian 32-bit value."
        },
        {
          "name": "first_difference",
          "signature": "pub fn first_difference(a: []u8, b: []u8) -> ?usize",
          "doc": "Bytes that differ, for a compact diff of two buffers."
        }
      ]
    },
    {
      "name": "deque",
      "source": "https://github.com/Londopy/nexium/blob/main/std/deque.nx",
      "about": "",
      "functions": [
        {
          "name": "of",
          "signature": "pub fn of(comptime T: type) -> Deque(T)",
          "doc": "An empty deque."
        },
        {
          "name": "push_back",
          "signature": "pub fn push_back(self: *mut Self, own x: T)",
          "doc": ""
        },
        {
          "name": "push_front",
          "signature": "pub fn push_front(self: *mut Self, own x: T)",
          "doc": ""
        },
        {
          "name": "pop_front",
          "signature": "pub fn pop_front(self: *mut Self) -> ?T",
          "doc": "Takes out the first element, or null when empty."
        },
        {
          "name": "pop_back",
          "signature": "pub fn pop_back(self: *mut Self) -> ?T",
          "doc": "Takes out the last element, or null when empty."
        },
        {
          "name": "len",
          "signature": "pub fn len(self: *Self) -> usize",
          "doc": ""
        },
        {
          "name": "is_empty",
          "signature": "pub fn is_empty(self: *Self) -> bool",
          "doc": ""
        },
        {
          "name": "get",
          "signature": "pub fn get(self: *Self, i: usize) -> ?*T",
          "doc": "The element `i` places from the front, left in place; null past the end."
        },
        {
          "name": "first",
          "signature": "pub fn first(self: *Self) -> ?*T",
          "doc": ""
        },
        {
          "name": "last",
          "signature": "pub fn last(self: *Self) -> ?*T",
          "doc": ""
        },
        {
          "name": "clear",
          "signature": "pub fn clear(self: *mut Self)",
          "doc": ""
        }
      ]
    },
    {
      "name": "fs",
      "source": "https://github.com/Londopy/nexium/blob/main/std/fs.nx",
      "about": "",
      "functions": [
        {
          "name": "exists",
          "signature": "pub fn exists(path: []u8) -> bool",
          "doc": "Is there a file or directory at `path`?"
        },
        {
          "name": "is_file",
          "signature": "pub fn is_file(path: []u8) -> bool",
          "doc": "Is `path` an existing regular file (anything that is not a directory)?"
        },
        {
          "name": "is_dir",
          "signature": "pub fn is_dir(path: []u8) -> bool",
          "doc": "Is `path` an existing directory?"
        },
        {
          "name": "size",
          "signature": "pub fn size(path: []u8) -> !u64",
          "doc": "The size of a file in bytes."
        },
        {
          "name": "modified",
          "signature": "pub fn modified(path: []u8) -> !i64",
          "doc": "The modification time in milliseconds since the epoch."
        },
        {
          "name": "read",
          "signature": "pub fn read(path: []u8) -> !String",
          "doc": "The whole file as a String."
        },
        {
          "name": "read_lines",
          "signature": "pub fn read_lines(path: []u8) -> !List(String)",
          "doc": "The lines of a file, without their line endings."
        },
        {
          "name": "write",
          "signature": "pub fn write(path: []u8, data: []u8) -> !void",
          "doc": "Write (replace) a file."
        },
        {
          "name": "append",
          "signature": "pub fn append(path: []u8, data: []u8) -> !void",
          "doc": "Append to a file, creating it when missing."
        },
        {
          "name": "copy",
          "signature": "pub fn copy(from: []u8, to: []u8) -> !void",
          "doc": "Copy a file's contents to a new path (the destination is replaced)."
        },
        {
          "name": "list",
          "signature": "pub fn list(path: []u8) -> !List(String)",
          "doc": "The names in a directory, sorted, without `.` and `..`."
        },
        {
          "name": "make_dir",
          "signature": "pub fn make_dir(path: []u8) -> !void",
          "doc": "Create one directory; fine when it already exists."
        },
        {
          "name": "make_dirs",
          "signature": "pub fn make_dirs(path: []u8) -> !void",
          "doc": "Create a directory and every missing parent."
        },
        {
          "name": "remove",
          "signature": "pub fn remove(path: []u8) -> !void",
          "doc": "Remove a file or an empty directory."
        },
        {
          "name": "remove_all",
          "signature": "pub fn remove_all(path: []u8) -> !void",
          "doc": "Remove a file, or a directory with everything in it."
        },
        {
          "name": "rename",
          "signature": "pub fn rename(from: []u8, to: []u8) -> !void",
          "doc": "Rename or move a file or directory (an existing destination file is replaced)."
        },
        {
          "name": "walk",
          "signature": "pub fn walk(root: []u8) -> !List(String)",
          "doc": "Every file under `root`, recursively, as paths joined onto `root`, sorted directory by directory. Directories themselves are not listed."
        },
        {
          "name": "cwd",
          "signature": "pub fn cwd() -> !String",
          "doc": "The current working directory."
        },
        {
          "name": "temp_dir",
          "signature": "pub fn temp_dir() -> String",
          "doc": "The directory for temporary files."
        },
        {
          "name": "temp_path",
          "signature": "pub fn temp_path(prefix: []u8) -> String",
          "doc": "A fresh path in the temporary directory, `<temp>/<prefix><number>`, that does not exist yet. The caller creates it."
        },
        {
          "name": "is_absolute",
          "signature": "pub fn is_absolute(path: []u8) -> bool",
          "doc": "Does the path start at a root (`/x`, `C:\\x`, `C:/x`, `\\\\server`)?"
        },
        {
          "name": "join",
          "signature": "pub fn join(dir: []u8, name: []u8) -> String",
          "doc": "`dir/name`; a separator is added only when needed, and an absolute `name` replaces `dir`."
        },
        {
          "name": "parent",
          "signature": "pub fn parent(path: []u8) -> []u8",
          "doc": "Everything before the last separator: `a/b/c.txt` -> `a/b`, `c.txt` -> ``, `/c.txt` -> `/`."
        },
        {
          "name": "base_name",
          "signature": "pub fn base_name(path: []u8) -> []u8",
          "doc": "The last component: `a/b/c.txt` -> `c.txt`."
        },
        {
          "name": "extension",
          "signature": "pub fn extension(path: []u8) -> []u8",
          "doc": "The extension without the dot: `a/b.tar.gz` -> `gz`, `Makefile` -> ``."
        },
        {
          "name": "stem",
          "signature": "pub fn stem(path: []u8) -> []u8",
          "doc": "The base name without its extension: `a/b.tar.gz` -> `b.tar`."
        },
        {
          "name": "with_extension",
          "signature": "pub fn with_extension(path: []u8, ext: []u8) -> String",
          "doc": "The path with its extension replaced (or added): `a/b.txt`, `md` -> `a/b.md`."
        },
        {
          "name": "normalize",
          "signature": "pub fn normalize(path: []u8) -> String",
          "doc": "Collapse `.` and `..` components and repeated separators: `a/./b/../c//d` -> `a/c/d`. A leading `..` is kept."
        }
      ]
    },
    {
      "name": "hash",
      "source": "https://github.com/Londopy/nexium/blob/main/std/hash.nx",
      "about": "",
      "functions": [
        {
          "name": "fnv1a64",
          "signature": "pub fn fnv1a64(data: []u8) -> u64",
          "doc": "FNV-1a over 64 bits."
        },
        {
          "name": "siphash",
          "signature": "pub fn siphash(key: []u8, data: []u8) -> u64",
          "doc": "SipHash-2-4 of `data` under a 16-byte key (panics on another length): what a hash table keyed by untrusted input should use."
        },
        {
          "name": "new",
          "signature": "pub fn new() -> Sha256",
          "doc": ""
        },
        {
          "name": "update",
          "signature": "pub fn update(self: *mut Self, data: []u8)",
          "doc": ""
        },
        {
          "name": "finish",
          "signature": "pub fn finish(self: *mut Self) -> String",
          "doc": "The 32-byte digest of everything given to `update`."
        },
        {
          "name": "sha256",
          "signature": "pub fn sha256(data: []u8) -> String",
          "doc": "The SHA-256 digest of `data`: 32 bytes."
        },
        {
          "name": "sha256_hex",
          "signature": "pub fn sha256_hex(data: []u8) -> String",
          "doc": "The SHA-256 digest of `data` as 64 lower-case hex digits."
        }
      ]
    },
    {
      "name": "heap",
      "source": "https://github.com/Londopy/nexium/blob/main/std/heap.nx",
      "about": "",
      "functions": [
        {
          "name": "by",
          "signature": "pub fn by(comptime T: type, less: fn(*T, *T) -> bool) -> Heap(T)",
          "doc": "An empty heap ordered by `less`."
        },
        {
          "name": "push",
          "signature": "pub fn push(self: *mut Self, own x: T)",
          "doc": "Adds `x`."
        },
        {
          "name": "pop",
          "signature": "pub fn pop(self: *mut Self) -> ?T",
          "doc": "Takes out the least element, or null when the heap is empty."
        },
        {
          "name": "peek",
          "signature": "pub fn peek(self: *Self) -> ?*T",
          "doc": "The least element, left in place; null when the heap is empty."
        },
        {
          "name": "len",
          "signature": "pub fn len(self: *Self) -> usize",
          "doc": ""
        },
        {
          "name": "is_empty",
          "signature": "pub fn is_empty(self: *Self) -> bool",
          "doc": ""
        },
        {
          "name": "clear",
          "signature": "pub fn clear(self: *mut Self)",
          "doc": ""
        }
      ]
    },
    {
      "name": "http",
      "source": "https://github.com/Londopy/nexium/blob/main/std/http.nx",
      "about": "",
      "functions": [
        {
          "name": "parse_url",
          "signature": "pub fn parse_url(s: []u8) -> ?Url",
          "doc": "Parse `http://host[:port][/path]`; null for anything else."
        },
        {
          "name": "header",
          "signature": "pub fn header(self: *Self, name: []u8) -> ?[]u8",
          "doc": "A header value, case-insensitive; null when absent."
        },
        {
          "name": "with_header",
          "signature": "pub fn with_header(self: *mut Self, name: []u8, value: []u8)",
          "doc": "Add or replace a header (builder style)."
        },
        {
          "name": "ok",
          "signature": "pub fn ok(self: *Self) -> bool",
          "doc": ""
        },
        {
          "name": "reason_for",
          "signature": "pub fn reason_for(status: u16) -> []u8",
          "doc": "The standard reason phrase for a status."
        },
        {
          "name": "respond",
          "signature": "pub fn respond(status: u16, content_type: []u8, body: []u8) -> Response",
          "doc": "A response with a body and a content type."
        },
        {
          "name": "text",
          "signature": "pub fn text(status: u16, body: []u8) -> Response",
          "doc": ""
        },
        {
          "name": "html",
          "signature": "pub fn html(status: u16, body: []u8) -> Response",
          "doc": ""
        },
        {
          "name": "json",
          "signature": "pub fn json(status: u16, body: []u8) -> Response",
          "doc": ""
        },
        {
          "name": "not_found",
          "signature": "pub fn not_found() -> Response",
          "doc": ""
        },
        {
          "name": "redirect",
          "signature": "pub fn redirect(location: []u8) -> Response",
          "doc": "A redirect to `location`."
        },
        {
          "name": "content_type_for",
          "signature": "pub fn content_type_for(path: []u8) -> []u8",
          "doc": "The content type for a file name, by extension."
        },
        {
          "name": "read_response",
          "signature": "pub fn read_response(r: *mut stream.Reader) -> !Response",
          "doc": "Read a full response from a reader over the connection."
        },
        {
          "name": "send_request",
          "signature": "pub fn send_request(w: *mut stream.Writer, method: []u8, url: *Url, headers: *List(Header), body: []u8) -> !void",
          "doc": "Write a request; `headers` may add or override the defaults."
        },
        {
          "name": "request",
          "signature": "pub fn request(method: []u8, url_text: []u8, headers: *List(Header), body: []u8) -> !Response",
          "doc": "Perform a request, following redirects. `error.InvalidInput` for a URL this client cannot speak (including `https://`)."
        },
        {
          "name": "get",
          "signature": "pub fn get(url: []u8) -> !Response",
          "doc": ""
        },
        {
          "name": "post",
          "signature": "pub fn post(url: []u8, content_type: []u8, body: []u8) -> !Response",
          "doc": ""
        },
        {
          "name": "header",
          "signature": "pub fn header(self: *Self, name: []u8) -> ?[]u8",
          "doc": ""
        },
        {
          "name": "param",
          "signature": "pub fn param(self: *Self, name: []u8) -> ?[]u8",
          "doc": "The value of a query parameter (`?a=1&b=2`), not decoded."
        },
        {
          "name": "read_request",
          "signature": "pub fn read_request(r: *mut stream.Reader, peer: []u8) -> !?Request",
          "doc": "Read a request from a reader over the connection; null when the connection was closed before a request line."
        },
        {
          "name": "read_request_max",
          "signature": "pub fn read_request_max(r: *mut stream.Reader, peer: []u8, max_body: usize) -> !?Request",
          "doc": "`read_request` with a body limit of `max_body` bytes (0: none)."
        },
        {
          "name": "write_response",
          "signature": "pub fn write_response(w: *mut stream.Writer, resp: *Response) -> !void",
          "doc": "Write a response with `Content-Length` and `Connection: close`."
        },
        {
          "name": "new",
          "signature": "pub fn new() -> Router",
          "doc": ""
        },
        {
          "name": "route",
          "signature": "pub fn route(self: *mut Self, method: []u8, path: []u8, handler: fn(*Request) -> Response)",
          "doc": ""
        },
        {
          "name": "get",
          "signature": "pub fn get(self: *mut Self, path: []u8, handler: fn(*Request) -> Response)",
          "doc": ""
        },
        {
          "name": "post",
          "signature": "pub fn post(self: *mut Self, path: []u8, handler: fn(*Request) -> Response)",
          "doc": ""
        },
        {
          "name": "serve_static",
          "signature": "pub fn serve_static(self: *mut Self, root: []u8)",
          "doc": "Serve files under `root` for paths no route claims."
        },
        {
          "name": "handle",
          "signature": "pub fn handle(self: *Self, req: *Request) -> Response",
          "doc": "The response for a request."
        },
        {
          "name": "static_file",
          "signature": "pub fn static_file(root: []u8, path: []u8) -> Response",
          "doc": "A file under `root` for a request path, refusing `..`; `index.html` for directories."
        },
        {
          "name": "bind",
          "signature": "pub fn bind(host: []u8, port: u16) -> !Server",
          "doc": ""
        },
        {
          "name": "port",
          "signature": "pub fn port(self: *Self) -> !u16",
          "doc": ""
        },
        {
          "name": "serve_one",
          "signature": "pub fn serve_one(self: *Self, router: *Router, timeout_ms: i64) -> !void",
          "doc": "Accept one connection, answer one request, close. `error.Timeout` when nobody connects within `timeout_ms` (0 waits forever)."
        },
        {
          "name": "serve",
          "signature": "pub fn serve(self: *Self, router: *Router) -> !void",
          "doc": "Serve forever, one request at a time."
        },
        {
          "name": "close",
          "signature": "pub fn close(self: *mut Self)",
          "doc": ""
        }
      ]
    },
    {
      "name": "json",
      "source": "https://github.com/Londopy/nexium/blob/main/std/json.nx",
      "about": "",
      "functions": [
        {
          "name": "null_value",
          "signature": "pub fn null_value() -> Json",
          "doc": ""
        },
        {
          "name": "boolean",
          "signature": "pub fn boolean(b: bool) -> Json",
          "doc": ""
        },
        {
          "name": "number",
          "signature": "pub fn number(n: f64) -> Json",
          "doc": ""
        },
        {
          "name": "string",
          "signature": "pub fn string(s: []u8) -> Json",
          "doc": ""
        },
        {
          "name": "array",
          "signature": "pub fn array() -> Json",
          "doc": ""
        },
        {
          "name": "object",
          "signature": "pub fn object() -> Json",
          "doc": ""
        },
        {
          "name": "push",
          "signature": "pub fn push(v: *mut Json, own item: Json)",
          "doc": "Append to an array; does nothing when `v` is not an array."
        },
        {
          "name": "set",
          "signature": "pub fn set(v: *mut Json, key: []u8, own value: Json)",
          "doc": "Set a key on an object (replacing an existing one); does nothing otherwise."
        },
        {
          "name": "get",
          "signature": "pub fn get(v: *Json, key: []u8) -> ?*Json",
          "doc": "The member `key` of an object, or null."
        },
        {
          "name": "get_mut",
          "signature": "pub fn get_mut(v: *mut Json, key: []u8) -> ?*mut Json",
          "doc": "The member `key` of an object, mutable, or null."
        },
        {
          "name": "at_mut",
          "signature": "pub fn at_mut(v: *mut Json, i: usize) -> ?*mut Json",
          "doc": "Element `i` of an array, mutable, or null."
        },
        {
          "name": "at",
          "signature": "pub fn at(v: *Json, i: usize) -> ?*Json",
          "doc": "Element `i` of an array, or null."
        },
        {
          "name": "len",
          "signature": "pub fn len(v: *Json) -> usize",
          "doc": "Number of elements or members; 0 for scalars."
        },
        {
          "name": "is_null",
          "signature": "pub fn is_null(v: *Json) -> bool",
          "doc": ""
        },
        {
          "name": "as_bool",
          "signature": "pub fn as_bool(v: *Json) -> ?bool",
          "doc": ""
        },
        {
          "name": "as_num",
          "signature": "pub fn as_num(v: *Json) -> ?f64",
          "doc": ""
        },
        {
          "name": "as_str",
          "signature": "pub fn as_str(v: *Json) -> ?[]u8",
          "doc": ""
        },
        {
          "name": "keys",
          "signature": "pub fn keys(v: *Json) -> List([]u8)",
          "doc": "Keys of an object in order; empty for anything else."
        },
        {
          "name": "parse",
          "signature": "pub fn parse(text: []u8) -> !Json",
          "doc": "Parse a JSON document. Trailing whitespace is allowed, anything else is an error."
        },
        {
          "name": "stringify",
          "signature": "pub fn stringify(v: *Json) -> String",
          "doc": "Compact text: no whitespace."
        },
        {
          "name": "pretty",
          "signature": "pub fn pretty(v: *Json, indent: usize) -> String",
          "doc": "Indented text, `indent` spaces per level."
        }
      ]
    },
    {
      "name": "lists",
      "source": "https://github.com/Londopy/nexium/blob/main/std/lists.nx",
      "about": "",
      "functions": [
        {
          "name": "sum",
          "signature": "pub fn sum(comptime T: type, xs: []T) -> T",
          "doc": "Sum of the elements."
        },
        {
          "name": "min",
          "signature": "pub fn min(comptime T: type where T: Ord, xs: []T) -> ?T",
          "doc": "Smallest element, or null when empty."
        },
        {
          "name": "max",
          "signature": "pub fn max(comptime T: type where T: Ord, xs: []T) -> ?T",
          "doc": "Largest element, or null when empty."
        },
        {
          "name": "arg_max",
          "signature": "pub fn arg_max(comptime T: type where T: Ord, xs: []T) -> ?usize",
          "doc": "Position of the largest element, or null when empty."
        },
        {
          "name": "all",
          "signature": "pub fn all(comptime T: type, xs: []T, pred: fn(T) -> bool) -> bool",
          "doc": "True when every element satisfies `pred`."
        },
        {
          "name": "any",
          "signature": "pub fn any(comptime T: type, xs: []T, pred: fn(T) -> bool) -> bool",
          "doc": "True when some element satisfies `pred`."
        },
        {
          "name": "count_if",
          "signature": "pub fn count_if(comptime T: type, xs: []T, pred: fn(T) -> bool) -> usize",
          "doc": "How many elements satisfy `pred`."
        },
        {
          "name": "filter",
          "signature": "pub fn filter(comptime T: type, xs: []T, pred: fn(T) -> bool) -> List(T)",
          "doc": "The elements that satisfy `pred`, in order."
        },
        {
          "name": "map",
          "signature": "pub fn map(comptime T: type, comptime U: type, xs: []T, f: fn(T) -> U) -> List(U)",
          "doc": "`f` applied to every element."
        },
        {
          "name": "fold",
          "signature": "pub fn fold(comptime T: type, comptime A: type, xs: []T, init: A, f: fn(A, T) -> A) -> A",
          "doc": "Left fold: `f(f(f(init, x0), x1), x2)`."
        },
        {
          "name": "find",
          "signature": "pub fn find(comptime T: type, xs: []T, pred: fn(T) -> bool) -> ?T",
          "doc": "First element satisfying `pred`, or null."
        },
        {
          "name": "position",
          "signature": "pub fn position(comptime T: type, xs: []T, pred: fn(T) -> bool) -> ?usize",
          "doc": "Position of the first element satisfying `pred`, or null."
        },
        {
          "name": "reversed",
          "signature": "pub fn reversed(comptime T: type, xs: []T) -> List(T)",
          "doc": "A reversed copy."
        },
        {
          "name": "dedup",
          "signature": "pub fn dedup(comptime T: type where T: Eq, xs: []T) -> List(T)",
          "doc": "Adjacent duplicates removed (sort first for global dedup)."
        },
        {
          "name": "take",
          "signature": "pub fn take(comptime T: type, xs: []T, n: usize) -> []T",
          "doc": "The first `n` elements (or all when shorter)."
        },
        {
          "name": "drop",
          "signature": "pub fn drop(comptime T: type, xs: []T, n: usize) -> []T",
          "doc": "Everything after the first `n` elements."
        },
        {
          "name": "window_starts",
          "signature": "pub fn window_starts(len: usize, size: usize) -> List(usize)",
          "doc": "Consecutive windows of `size`, as start indices; `for i in windows(xs, 3)` then `xs[i..i+3]`."
        },
        {
          "name": "zip",
          "signature": "pub fn zip(comptime A: type, comptime B: type, a: []A, b: []B) -> List((A, B))",
          "doc": "Pairs (a[i], b[i]) up to the shorter length."
        },
        {
          "name": "repeat",
          "signature": "pub fn repeat(comptime T: type, xs: []T, times: usize) -> List(T)",
          "doc": "Elements repeated `times` times in sequence."
        },
        {
          "name": "starts_with",
          "signature": "pub fn starts_with(comptime T: type where T: Eq, xs: []T, prefix: []T) -> bool",
          "doc": "True when `xs` starts with `prefix`."
        }
      ]
    },
    {
      "name": "net",
      "source": "https://github.com/Londopy/nexium/blob/main/std/net.nx",
      "about": "",
      "functions": [
        {
          "name": "parse_addr",
          "signature": "pub fn parse_addr(s: []u8) -> ?Addr",
          "doc": "Split `host:port` or `[v6]:port`; null when there is no valid port."
        },
        {
          "name": "port_of",
          "signature": "pub fn port_of(s: []u8) -> ?u16",
          "doc": "The port at the end of `host:port`, or null."
        },
        {
          "name": "resolve",
          "signature": "pub fn resolve(host: []u8) -> !List(String)",
          "doc": "The addresses a name resolves to, numeric, in resolver order."
        },
        {
          "name": "connect",
          "signature": "pub fn connect(host: []u8, port: u16) -> !TcpStream",
          "doc": "Connect with a 10 second timeout."
        },
        {
          "name": "connect_timeout",
          "signature": "pub fn connect_timeout(host: []u8, port: u16, timeout_ms: i64) -> !TcpStream",
          "doc": "Connect; `timeout_ms` 0 waits as long as the OS does."
        },
        {
          "name": "from_socket",
          "signature": "pub fn from_socket(sock: i64) -> TcpStream",
          "doc": "Wrap a socket from `net.accept` or `net.connect`."
        },
        {
          "name": "set_timeout",
          "signature": "pub fn set_timeout(self: *mut Self, ms: i64)",
          "doc": "The receive timeout in milliseconds; 0 waits forever."
        },
        {
          "name": "send",
          "signature": "pub fn send(self: *Self, data: []u8) -> !void",
          "doc": ""
        },
        {
          "name": "recv",
          "signature": "pub fn recv(self: *Self, n: usize) -> !String",
          "doc": "Up to `n` bytes; empty when the peer has closed."
        },
        {
          "name": "recv_all",
          "signature": "pub fn recv_all(self: *Self) -> !String",
          "doc": "Everything until the peer closes."
        },
        {
          "name": "peer",
          "signature": "pub fn peer(self: *Self) -> !String",
          "doc": "The remote address as `ip:port`."
        },
        {
          "name": "local",
          "signature": "pub fn local(self: *Self) -> !String",
          "doc": "The local address as `ip:port`."
        },
        {
          "name": "reader",
          "signature": "pub fn reader(self: *Self) -> stream.Reader",
          "doc": "A buffered reader over the socket (lines, chunks); does not own it. A buffered reader over the socket, with its receive timeout."
        },
        {
          "name": "writer",
          "signature": "pub fn writer(self: *Self) -> stream.Writer",
          "doc": "A buffered writer over the socket; flush it before waiting for a reply."
        },
        {
          "name": "close",
          "signature": "pub fn close(self: *mut Self)",
          "doc": ""
        },
        {
          "name": "bind",
          "signature": "pub fn bind(host: []u8, port: u16) -> !TcpListener",
          "doc": "Bind and listen; port 0 picks a free port (see `local`)."
        },
        {
          "name": "local",
          "signature": "pub fn local(self: *Self) -> !String",
          "doc": "The bound address as `ip:port`."
        },
        {
          "name": "port",
          "signature": "pub fn port(self: *Self) -> !u16",
          "doc": "The bound port."
        },
        {
          "name": "accept",
          "signature": "pub fn accept(self: *Self) -> !TcpStream",
          "doc": "Wait for a connection."
        },
        {
          "name": "accept_timeout",
          "signature": "pub fn accept_timeout(self: *Self, timeout_ms: i64) -> !TcpStream",
          "doc": "Wait up to `timeout_ms` for a connection (`error.Timeout` otherwise)."
        },
        {
          "name": "close",
          "signature": "pub fn close(self: *mut Self)",
          "doc": ""
        },
        {
          "name": "bind",
          "signature": "pub fn bind(host: []u8, port: u16) -> !UdpSocket",
          "doc": "Bind; port 0 picks a free port."
        },
        {
          "name": "set_timeout",
          "signature": "pub fn set_timeout(self: *mut Self, ms: i64)",
          "doc": ""
        },
        {
          "name": "local",
          "signature": "pub fn local(self: *Self) -> !String",
          "doc": ""
        },
        {
          "name": "port",
          "signature": "pub fn port(self: *Self) -> !u16",
          "doc": ""
        },
        {
          "name": "send_to",
          "signature": "pub fn send_to(self: *Self, host: []u8, port: u16, data: []u8) -> !void",
          "doc": ""
        },
        {
          "name": "recv_from",
          "signature": "pub fn recv_from(self: *Self, n: usize) -> !Datagram",
          "doc": "One datagram of at most `n` bytes."
        },
        {
          "name": "close",
          "signature": "pub fn close(self: *mut Self)",
          "doc": ""
        }
      ]
    },
    {
      "name": "num",
      "source": "https://github.com/Londopy/nexium/blob/main/std/num.nx",
      "about": "",
      "functions": [
        {
          "name": "gcd",
          "signature": "pub fn gcd(a: u64, b: u64) -> u64",
          "doc": "Greatest common divisor (Euclid); gcd(0, 0) is 0."
        },
        {
          "name": "lcm",
          "signature": "pub fn lcm(a: u64, b: u64) -> u64",
          "doc": "Least common multiple; lcm(0, n) is 0."
        },
        {
          "name": "clamp",
          "signature": "pub fn clamp(x: i64, lo: i64, hi: i64) -> i64",
          "doc": "`x` limited to `lo..=hi`."
        },
        {
          "name": "abs_diff",
          "signature": "pub fn abs_diff(a: i64, b: i64) -> u64",
          "doc": "|a - b| without overflow on the way."
        },
        {
          "name": "pow",
          "signature": "pub fn pow(base: u64, exp: u32) -> ?u64",
          "doc": "`base` to the `exp`, by squaring; null on overflow."
        },
        {
          "name": "isqrt",
          "signature": "pub fn isqrt(n: u64) -> u64",
          "doc": "Integer square root: the largest `r` with `r * r <= n`."
        },
        {
          "name": "is_prime",
          "signature": "pub fn is_prime(n: u64) -> bool",
          "doc": "Trial division; fine for the sizes people type by hand."
        },
        {
          "name": "factors",
          "signature": "pub fn factors(n: u64) -> List(u64)",
          "doc": "The prime factors of `n` with multiplicity, ascending."
        },
        {
          "name": "digits",
          "signature": "pub fn digits(n: u64) -> List(u8)",
          "doc": "Decimal digits of `n`, most significant first."
        },
        {
          "name": "digit_sum",
          "signature": "pub fn digit_sum(n: u64) -> u64",
          "doc": "Sum of the decimal digits."
        },
        {
          "name": "to_base",
          "signature": "pub fn to_base(n: u64, base: u64) -> String",
          "doc": "`n` in base 2..36, upper-case digits."
        },
        {
          "name": "from_base",
          "signature": "pub fn from_base(text: []u8, base: u64) -> ?u64",
          "doc": "Parse in base 2..36 (either case); null on an invalid digit or overflow."
        },
        {
          "name": "round_up",
          "signature": "pub fn round_up(n: u64, m: u64) -> u64",
          "doc": "Round up to a multiple of `m` (m > 0)."
        },
        {
          "name": "is_power_of_two",
          "signature": "pub fn is_power_of_two(n: u64) -> bool",
          "doc": "True for 1, 2, 4, 8, ..."
        },
        {
          "name": "next_power_of_two",
          "signature": "pub fn next_power_of_two(n: u64) -> u64",
          "doc": "The smallest power of two >= n (n <= 2^63)."
        },
        {
          "name": "popcount",
          "signature": "pub fn popcount(n: u64) -> u32",
          "doc": "Number of set bits."
        }
      ]
    },
    {
      "name": "process",
      "source": "https://github.com/Londopy/nexium/blob/main/std/process.nx",
      "about": "",
      "functions": [
        {
          "name": "ok",
          "signature": "pub fn ok(self: *Self) -> bool",
          "doc": ""
        },
        {
          "name": "text",
          "signature": "pub fn text(self: *Self) -> []u8",
          "doc": "stdout without a trailing newline."
        },
        {
          "name": "run_with",
          "signature": "pub fn run_with(argv: [][]u8, opts: Options) -> !Output",
          "doc": ""
        },
        {
          "name": "run",
          "signature": "pub fn run(argv: [][]u8) -> !Output",
          "doc": "Run and capture, inheriting the working directory, with no stdin."
        },
        {
          "name": "shell",
          "signature": "pub fn shell(command: []u8) -> !Output",
          "doc": "Run a command line through the platform shell."
        }
      ]
    },
    {
      "name": "regex",
      "source": "https://github.com/Londopy/nexium/blob/main/std/regex.nx",
      "about": "",
      "functions": [
        {
          "name": "compile",
          "signature": "pub fn compile(pattern: []u8) -> !Regex",
          "doc": "Compile a pattern; `error.InvalidInput` when it is malformed."
        },
        {
          "name": "is_match",
          "signature": "pub fn is_match(pattern: []u8, text: []u8) -> !bool",
          "doc": "Does `pattern` match anywhere in `text`? (Compiles every call.)"
        },
        {
          "name": "text",
          "signature": "pub fn text(self: *Self) -> []u8",
          "doc": "The matched bytes."
        },
        {
          "name": "group",
          "signature": "pub fn group(self: *Self, i: usize) -> ?[]u8",
          "doc": "Group `i` (0 is the whole match); null when the group did not participate."
        },
        {
          "name": "group_count",
          "signature": "pub fn group_count(self: *Self) -> usize",
          "doc": "The number of groups, counting group 0."
        },
        {
          "name": "find_at",
          "signature": "pub fn find_at(self: *Self, text: []u8, from: usize) -> ?Match",
          "doc": "The first match at or after byte `from`."
        },
        {
          "name": "find",
          "signature": "pub fn find(self: *Self, text: []u8) -> ?Match",
          "doc": "The first match in `text`."
        },
        {
          "name": "is_match",
          "signature": "pub fn is_match(self: *Self, text: []u8) -> bool",
          "doc": "Does the pattern match anywhere in `text`?"
        },
        {
          "name": "find_all",
          "signature": "pub fn find_all(self: *Self, text: []u8) -> List(Match)",
          "doc": "Every non-overlapping match, left to right."
        },
        {
          "name": "replace_all",
          "signature": "pub fn replace_all(self: *Self, text: []u8, repl: []u8) -> String",
          "doc": "Replace every match. In `repl`, `$0`..`$9` insert groups and `$$` is a dollar sign."
        },
        {
          "name": "split",
          "signature": "pub fn split(self: *Self, text: []u8) -> List([]u8)",
          "doc": "The pieces of `text` between matches."
        }
      ]
    },
    {
      "name": "set",
      "source": "https://github.com/Londopy/nexium/blob/main/std/set.nx",
      "about": "",
      "functions": [
        {
          "name": "of",
          "signature": "pub fn of(comptime T: type) -> Set(T)",
          "doc": "An empty set."
        },
        {
          "name": "add",
          "signature": "pub fn add(self: *mut Self, own x: T) -> bool",
          "doc": "Adds `x`; true when it was not already there."
        },
        {
          "name": "contains",
          "signature": "pub fn contains(self: *Self, x: T) -> bool",
          "doc": ""
        },
        {
          "name": "remove",
          "signature": "pub fn remove(self: *mut Self, x: T) -> bool",
          "doc": "Takes `x` out; true when it was there."
        },
        {
          "name": "len",
          "signature": "pub fn len(self: *Self) -> usize",
          "doc": ""
        },
        {
          "name": "is_empty",
          "signature": "pub fn is_empty(self: *Self) -> bool",
          "doc": ""
        },
        {
          "name": "clear",
          "signature": "pub fn clear(self: *mut Self)",
          "doc": ""
        },
        {
          "name": "items",
          "signature": "pub fn items(self: *Self) -> List(T)",
          "doc": "The elements, in no particular order."
        },
        {
          "name": "union",
          "signature": "pub fn union(comptime T: type, a: *Set(T), b: *Set(T)) -> Set(T)",
          "doc": "The values in `a` or `b`."
        },
        {
          "name": "intersection",
          "signature": "pub fn intersection(comptime T: type, a: *Set(T), b: *Set(T)) -> Set(T)",
          "doc": "The values in both `a` and `b`."
        },
        {
          "name": "difference",
          "signature": "pub fn difference(comptime T: type, a: *Set(T), b: *Set(T)) -> Set(T)",
          "doc": "The values in `a` that are not in `b`."
        },
        {
          "name": "is_subset",
          "signature": "pub fn is_subset(comptime T: type, a: *Set(T), b: *Set(T)) -> bool",
          "doc": "Whether every value of `a` is in `b`."
        }
      ]
    },
    {
      "name": "sort",
      "source": "https://github.com/Londopy/nexium/blob/main/std/sort.nx",
      "about": "",
      "functions": [
        {
          "name": "by",
          "signature": "pub fn by(comptime T: type, xs: []mut T, less: fn(*T, *T) -> bool)",
          "doc": "Sorts `xs` so that `less(b, a)` holds for no `a` before `b`: ascending by `less`. The order of equal elements is not kept."
        },
        {
          "name": "stable_by",
          "signature": "pub fn stable_by(comptime T: type, xs: []mut T, less: fn(*T, *T) -> bool)",
          "doc": "Sorts `xs` ascending by `less`, keeping equal elements in the order they had."
        },
        {
          "name": "by_key",
          "signature": "pub fn by_key(comptime T: type, comptime K: type where K: Ord, xs: []mut T, key: fn(*T) -> K)",
          "doc": "Sorts `xs` ascending by `key` of each element, keeping elements with equal keys in the order they had; `key` is called once per element."
        },
        {
          "name": "is_sorted",
          "signature": "pub fn is_sorted(comptime T: type where T: Ord, xs: []T) -> bool",
          "doc": "Whether `xs` is ascending by `<`."
        },
        {
          "name": "is_sorted_by",
          "signature": "pub fn is_sorted_by(comptime T: type, xs: []T, less: fn(*T, *T) -> bool) -> bool",
          "doc": "Whether `xs` is ascending by `less`."
        },
        {
          "name": "lower_bound",
          "signature": "pub fn lower_bound(comptime T: type where T: Ord, xs: []T, x: T) -> usize",
          "doc": "In an ascending `xs`, the first position whose element is not less than `x`: where `x` would go before any equal to it."
        },
        {
          "name": "upper_bound",
          "signature": "pub fn upper_bound(comptime T: type where T: Ord, xs: []T, x: T) -> usize",
          "doc": "In an ascending `xs`, the first position whose element is greater than `x`: where `x` would go after any equal to it."
        },
        {
          "name": "binary_search",
          "signature": "pub fn binary_search(comptime T: type where T: Ord, xs: []T, x: T) -> ?usize",
          "doc": "In an ascending `xs`, a position holding `x`, or null."
        }
      ]
    },
    {
      "name": "stream",
      "source": "https://github.com/Londopy/nexium/blob/main/std/stream.nx",
      "about": "",
      "functions": [
        {
          "name": "open",
          "signature": "pub fn open(path: []u8) -> !Reader",
          "doc": "Open a file for reading."
        },
        {
          "name": "stdin",
          "signature": "pub fn stdin() -> Reader",
          "doc": "Standard input."
        },
        {
          "name": "from_handle",
          "signature": "pub fn from_handle(handle: i64) -> Reader",
          "doc": "Wrap a handle from `io.open`; `close` will not close it."
        },
        {
          "name": "from_socket",
          "signature": "pub fn from_socket(sock: i64) -> Reader",
          "doc": "Wrap a connected socket from `net.connect` or `net.accept`; `close` will not close it."
        },
        {
          "name": "from_socket_timeout",
          "signature": "pub fn from_socket_timeout(sock: i64, timeout_ms: i64) -> Reader",
          "doc": "`from_socket`, each read waiting at most `timeout_ms` for data (`error.Timeout` then; 0 waits forever)."
        },
        {
          "name": "read_line",
          "signature": "pub fn read_line(self: *mut Self) -> !?String",
          "doc": "The next line without its `\\n` (or `\\r\\n`); null at end of input."
        },
        {
          "name": "read_line_max",
          "signature": "pub fn read_line_max(self: *mut Self, max: usize) -> !?String",
          "doc": "`read_line`, refusing a line longer than `max` bytes with `error.TooLarge` rather than buffering it (0: no limit). Input from a peer that need not end its lines calls for one."
        },
        {
          "name": "read",
          "signature": "pub fn read(self: *mut Self, n: usize) -> !String",
          "doc": "Up to `n` bytes; empty at end of input."
        },
        {
          "name": "read_all",
          "signature": "pub fn read_all(self: *mut Self) -> !String",
          "doc": "Everything that is left."
        },
        {
          "name": "close",
          "signature": "pub fn close(self: *mut Self)",
          "doc": "Release the file (the standard streams stay open)."
        },
        {
          "name": "open",
          "signature": "pub fn open(path: []u8) -> !Writer",
          "doc": "Create or replace a file."
        },
        {
          "name": "append",
          "signature": "pub fn append(path: []u8) -> !Writer",
          "doc": "Open a file for appending."
        },
        {
          "name": "stdout",
          "signature": "pub fn stdout() -> Writer",
          "doc": ""
        },
        {
          "name": "stderr",
          "signature": "pub fn stderr() -> Writer",
          "doc": ""
        },
        {
          "name": "from_handle",
          "signature": "pub fn from_handle(handle: i64) -> Writer",
          "doc": "Wrap a handle from `io.open`; `close` will not close it."
        },
        {
          "name": "from_socket",
          "signature": "pub fn from_socket(sock: i64) -> Writer",
          "doc": "Wrap a connected socket; `close` will not close it."
        },
        {
          "name": "write",
          "signature": "pub fn write(self: *mut Self, data: []u8) -> !void",
          "doc": ""
        },
        {
          "name": "write_line",
          "signature": "pub fn write_line(self: *mut Self, data: []u8) -> !void",
          "doc": ""
        },
        {
          "name": "flush",
          "signature": "pub fn flush(self: *mut Self) -> !void",
          "doc": "Hand buffered output to the handle."
        },
        {
          "name": "close",
          "signature": "pub fn close(self: *mut Self) -> !void",
          "doc": "Flush, then release the file (the standard streams stay open)."
        },
        {
          "name": "copy",
          "signature": "pub fn copy(r: *mut Reader, w: *mut Writer) -> !usize",
          "doc": "Copy everything from a reader to a writer; the number of bytes moved."
        }
      ]
    },
    {
      "name": "strings",
      "source": "https://github.com/Londopy/nexium/blob/main/std/strings.nx",
      "about": "",
      "functions": [
        {
          "name": "join",
          "signature": "pub fn join(parts: [][]u8, sep: []u8) -> String",
          "doc": "Concatenate `parts` with `sep` between them."
        },
        {
          "name": "repeat",
          "signature": "pub fn repeat(s: []u8, n: usize) -> String",
          "doc": "`s` repeated `n` times."
        },
        {
          "name": "pad_left",
          "signature": "pub fn pad_left(s: []u8, width: usize, fill: u8) -> String",
          "doc": "Left-pad with `fill` to at least `width` bytes."
        },
        {
          "name": "pad_right",
          "signature": "pub fn pad_right(s: []u8, width: usize, fill: u8) -> String",
          "doc": "Right-pad with `fill` to at least `width` bytes."
        },
        {
          "name": "center",
          "signature": "pub fn center(s: []u8, width: usize, fill: u8) -> String",
          "doc": "Center in `width` bytes, extra fill on the right."
        },
        {
          "name": "count",
          "signature": "pub fn count(s: []u8, needle: []u8) -> usize",
          "doc": "How many non-overlapping times `needle` occurs in `s`."
        },
        {
          "name": "replace",
          "signature": "pub fn replace(s: []u8, from: []u8, to: []u8) -> String",
          "doc": "Every occurrence of `from` replaced by `to`."
        },
        {
          "name": "index_from",
          "signature": "pub fn index_from(s: []u8, needle: []u8, start: usize) -> ?usize",
          "doc": "Position of `needle` at or after `start`."
        },
        {
          "name": "last_index",
          "signature": "pub fn last_index(s: []u8, needle: []u8) -> ?usize",
          "doc": "Position of the last occurrence of `needle`."
        },
        {
          "name": "strip_prefix",
          "signature": "pub fn strip_prefix(s: []u8, prefix: []u8) -> ?[]u8",
          "doc": "`s` without a leading `prefix`, or null when it does not start with it."
        },
        {
          "name": "strip_suffix",
          "signature": "pub fn strip_suffix(s: []u8, suffix: []u8) -> ?[]u8",
          "doc": "`s` without a trailing `suffix`, or null when it does not end with it."
        },
        {
          "name": "trim_left",
          "signature": "pub fn trim_left(s: []u8) -> []u8",
          "doc": "Leading ASCII whitespace removed."
        },
        {
          "name": "trim_right",
          "signature": "pub fn trim_right(s: []u8) -> []u8",
          "doc": "Trailing ASCII whitespace removed."
        },
        {
          "name": "is_blank",
          "signature": "pub fn is_blank(s: []u8) -> bool",
          "doc": "True when `s` is empty or only ASCII whitespace."
        },
        {
          "name": "split_whitespace",
          "signature": "pub fn split_whitespace(s: []u8) -> List([]u8)",
          "doc": "Split on runs of ASCII whitespace; no empty pieces."
        },
        {
          "name": "to_upper",
          "signature": "pub fn to_upper(s: []u8) -> String",
          "doc": "ASCII letters upper-cased; other bytes unchanged."
        },
        {
          "name": "to_lower",
          "signature": "pub fn to_lower(s: []u8) -> String",
          "doc": "ASCII letters lower-cased; other bytes unchanged."
        },
        {
          "name": "capitalize",
          "signature": "pub fn capitalize(s: []u8) -> String",
          "doc": "First ASCII letter upper-cased."
        },
        {
          "name": "reverse",
          "signature": "pub fn reverse(s: []u8) -> String",
          "doc": "Bytes in reverse order (bytes, not code points)."
        },
        {
          "name": "split_once",
          "signature": "pub fn split_once(s: []u8, sep: []u8) -> ?([]u8, []u8)",
          "doc": "Cut at the first `sep`: (before, after), or null when `sep` is absent."
        },
        {
          "name": "ellipsize",
          "signature": "pub fn ellipsize(s: []u8, max: usize) -> String",
          "doc": "Truncate to `max` bytes, appending `...` when something was cut."
        }
      ]
    },
    {
      "name": "testing",
      "source": "https://github.com/Londopy/nexium/blob/main/std/testing.nx",
      "about": "",
      "functions": [
        {
          "name": "approx",
          "signature": "pub fn approx(a: f64, b: f64, eps: f64) -> bool",
          "doc": "Are two floats within `eps` of each other?"
        },
        {
          "name": "expect_approx",
          "signature": "pub fn expect_approx(a: f64, b: f64, eps: f64)",
          "doc": "Panics unless `a` and `b` are within `eps`."
        },
        {
          "name": "is_err",
          "signature": "pub fn is_err(comptime T: type, own r: !T) -> bool",
          "doc": "Did the call fail? (Any error counts.)"
        },
        {
          "name": "expect_err",
          "signature": "pub fn expect_err(comptime T: type, own r: !T)",
          "doc": "Panics unless the result is an error."
        },
        {
          "name": "expect_error",
          "signature": "pub fn expect_error(comptime T: type, own r: !T, err: error)",
          "doc": "Panics unless the result is exactly `err`."
        },
        {
          "name": "expect_contains",
          "signature": "pub fn expect_contains(hay: []u8, needle: []u8)",
          "doc": "Panics unless `hay` contains `needle`."
        },
        {
          "name": "expect_lines",
          "signature": "pub fn expect_lines(actual: []u8, expected: []u8)",
          "doc": "Compares line by line; panics naming the first line that differs."
        },
        {
          "name": "snapshot_in",
          "signature": "pub fn snapshot_in(dir: []u8, name: []u8, actual: []u8) -> !void",
          "doc": "Compare `actual` to `<dir>/<name>.txt`; write it when missing or when NX_UPDATE_SNAPSHOTS is set."
        },
        {
          "name": "snapshot",
          "signature": "pub fn snapshot(name: []u8, actual: []u8) -> !void",
          "doc": "`snapshot_in(\"snapshots\", name, actual)`."
        },
        {
          "name": "expect_snapshot_in",
          "signature": "pub fn expect_snapshot_in(dir: []u8, name: []u8, actual: []u8)",
          "doc": "`snapshot_in`, in the `expect_` form: a mismatch fails the test naming the file, the first differing line and how to accept the new output; a file that cannot be read or written fails it too, instead of returning an error for the test to handle."
        },
        {
          "name": "expect_snapshot",
          "signature": "pub fn expect_snapshot(name: []u8, actual: []u8)",
          "doc": "`expect_snapshot_in(\"snapshots\", name, actual)`."
        }
      ]
    },
    {
      "name": "text",
      "source": "https://github.com/Londopy/nexium/blob/main/std/text.nx",
      "about": "",
      "functions": [
        {
          "name": "decode_at",
          "signature": "pub fn decode_at(s: []u8, i: usize) -> Decoded",
          "doc": "Decode the code point starting at byte `i`. Invalid input yields U+FFFD with length 1 so callers always make progress."
        },
        {
          "name": "push",
          "signature": "pub fn push(out: *mut String, cp: u32)",
          "doc": "Append a code point as UTF-8."
        },
        {
          "name": "encode",
          "signature": "pub fn encode(cp: u32) -> String",
          "doc": "A code point as a String."
        },
        {
          "name": "is_valid",
          "signature": "pub fn is_valid(s: []u8) -> bool",
          "doc": "Is the text well-formed UTF-8?"
        },
        {
          "name": "chars",
          "signature": "pub fn chars(s: []u8) -> List(u32)",
          "doc": "All code points."
        },
        {
          "name": "char_count",
          "signature": "pub fn char_count(s: []u8) -> usize",
          "doc": "The number of code points."
        },
        {
          "name": "byte_offset",
          "signature": "pub fn byte_offset(s: []u8, n: usize) -> usize",
          "doc": "The byte offset of the `n`th code point (or `s.len` when past the end)."
        },
        {
          "name": "char_at",
          "signature": "pub fn char_at(s: []u8, n: usize) -> ?u32",
          "doc": "The `n`th code point, or null."
        },
        {
          "name": "slice",
          "signature": "pub fn slice(s: []u8, from: usize, to: usize) -> []u8",
          "doc": "Code points `from` (inclusive) to `to` (exclusive), as a slice of `s`."
        },
        {
          "name": "truncate",
          "signature": "pub fn truncate(s: []u8, n: usize) -> []u8",
          "doc": "The first `n` code points; never cuts a character in half."
        },
        {
          "name": "reverse",
          "signature": "pub fn reverse(s: []u8) -> String",
          "doc": "The code points in reverse order."
        },
        {
          "name": "is_zero_width",
          "signature": "pub fn is_zero_width(cp: u32) -> bool",
          "doc": "Does the code point take no columns (combining marks, zero-width, controls)?"
        },
        {
          "name": "is_wide",
          "signature": "pub fn is_wide(cp: u32) -> bool",
          "doc": "Does the code point take two columns (East Asian wide and fullwidth)?"
        },
        {
          "name": "char_width",
          "signature": "pub fn char_width(cp: u32) -> usize",
          "doc": "Columns a code point takes on a terminal: 0, 1 or 2."
        },
        {
          "name": "width",
          "signature": "pub fn width(s: []u8) -> usize",
          "doc": "Columns the text takes on a terminal."
        },
        {
          "name": "pad_right",
          "signature": "pub fn pad_right(s: []u8, columns: usize) -> String",
          "doc": "Pad on the right to `columns` terminal columns (by width, not bytes)."
        },
        {
          "name": "upper_char",
          "signature": "pub fn upper_char(cp: u32) -> u32",
          "doc": "Upper-case a code point where the mapping is a fixed offset: ASCII, Latin-1, Latin Extended-A (pairs), Greek, Cyrillic."
        },
        {
          "name": "lower_char",
          "signature": "pub fn lower_char(cp: u32) -> u32",
          "doc": "Lower-case a code point; the inverse of `upper_char`."
        },
        {
          "name": "to_upper",
          "signature": "pub fn to_upper(s: []u8) -> String",
          "doc": ""
        },
        {
          "name": "to_lower",
          "signature": "pub fn to_lower(s: []u8) -> String",
          "doc": ""
        },
        {
          "name": "eq_ignore_case",
          "signature": "pub fn eq_ignore_case(a: []u8, b: []u8) -> bool",
          "doc": "Compare ignoring case, using the same mapping as `to_lower`."
        }
      ]
    },
    {
      "name": "thread",
      "source": "https://github.com/Londopy/nexium/blob/main/std/thread.nx",
      "about": "",
      "functions": [
        {
          "name": "spawn",
          "signature": "pub fn spawn(comptime T: type, comptime R: type, f: fn(*mut T) -> R, own arg: T) -> Thread(T, R)",
          "doc": "Run `f(&mut arg)` on a new thread."
        },
        {
          "name": "join",
          "signature": "pub fn join(self: *mut Self) -> R",
          "doc": "Wait for the thread and take its result. Joining twice panics."
        },
        {
          "name": "arg",
          "signature": "pub fn arg(self: *Self) -> *T",
          "doc": "The argument after the thread finished (for results written in place)."
        },
        {
          "name": "run",
          "signature": "pub fn run(comptime T: type, f: fn(*mut T) -> void, own arg: T) -> Worker(T)",
          "doc": "Run `f(&mut arg)` on a new thread, for functions without a result."
        },
        {
          "name": "join",
          "signature": "pub fn join(self: *mut Self)",
          "doc": "Wait for the thread. Joining twice panics."
        },
        {
          "name": "arg",
          "signature": "pub fn arg(self: *Self) -> *T",
          "doc": "The argument after the thread finished (for results written in place)."
        },
        {
          "name": "count",
          "signature": "pub fn count() -> usize",
          "doc": "The number of hardware threads."
        },
        {
          "name": "channel",
          "signature": "pub fn channel(comptime T: type) -> Channel(T)",
          "doc": ""
        },
        {
          "name": "send",
          "signature": "pub fn send(self: *mut Self, own value: T)",
          "doc": ""
        },
        {
          "name": "recv",
          "signature": "pub fn recv(self: *mut Self) -> ?T",
          "doc": "The next value, waiting for one; null when closed and empty."
        },
        {
          "name": "try_recv",
          "signature": "pub fn try_recv(self: *mut Self) -> ?T",
          "doc": "The next value if one is queued, without waiting."
        },
        {
          "name": "close",
          "signature": "pub fn close(self: *mut Self)",
          "doc": "No more values will be sent; receivers drain what is left, then see null."
        },
        {
          "name": "len",
          "signature": "pub fn len(self: *mut Self) -> usize",
          "doc": ""
        },
        {
          "name": "free",
          "signature": "pub fn free(self: *mut Self)",
          "doc": "Release the lock and condition variable; after every user has stopped."
        },
        {
          "name": "mutex",
          "signature": "pub fn mutex(comptime T: type, own value: T) -> Mutex(T)",
          "doc": ""
        },
        {
          "name": "lock",
          "signature": "pub fn lock(self: *mut Self) -> *mut T",
          "doc": "Take the lock; the pointer is valid until `unlock`."
        },
        {
          "name": "unlock",
          "signature": "pub fn unlock(self: *mut Self)",
          "doc": ""
        },
        {
          "name": "free",
          "signature": "pub fn free(self: *mut Self)",
          "doc": "Release the lock; after every user has stopped."
        }
      ]
    },
    {
      "name": "time",
      "source": "https://github.com/Londopy/nexium/blob/main/std/time.nx",
      "about": "",
      "functions": [
        {
          "name": "is_leap",
          "signature": "pub fn is_leap(year: i32) -> bool",
          "doc": ""
        },
        {
          "name": "days_in_month",
          "signature": "pub fn days_in_month(year: i32, month: u8) -> u8",
          "doc": ""
        },
        {
          "name": "utc",
          "signature": "pub fn utc(ms: i64) -> DateTime",
          "doc": "Break an instant down in UTC."
        },
        {
          "name": "local",
          "signature": "pub fn local(ms: i64) -> DateTime",
          "doc": "Break an instant down in the machine's local time zone."
        },
        {
          "name": "with_offset",
          "signature": "pub fn with_offset(ms: i64, offset_min: i32) -> DateTime",
          "doc": "Break an instant down at a fixed offset in minutes east of UTC."
        },
        {
          "name": "now_utc",
          "signature": "pub fn now_utc() -> DateTime",
          "doc": "The current instant, in UTC."
        },
        {
          "name": "now_local",
          "signature": "pub fn now_local() -> DateTime",
          "doc": "The current instant, in local time."
        },
        {
          "name": "date",
          "signature": "pub fn date(year: i32, month: u8, day: u8) -> ?DateTime",
          "doc": "A date at midnight UTC; `null` when the fields do not name a real day."
        },
        {
          "name": "to_ms",
          "signature": "pub fn to_ms(self: *Self) -> i64",
          "doc": "Milliseconds since the epoch (the offset is subtracted back out)."
        },
        {
          "name": "to_utc",
          "signature": "pub fn to_utc(self: *Self) -> DateTime",
          "doc": "The same instant expressed in UTC."
        },
        {
          "name": "weekday",
          "signature": "pub fn weekday(self: *Self) -> u8",
          "doc": "Day of the week, 0 = Monday ... 6 = Sunday."
        },
        {
          "name": "day_of_year",
          "signature": "pub fn day_of_year(self: *Self) -> u16",
          "doc": "Day of the year, 1-based."
        },
        {
          "name": "date_text",
          "signature": "pub fn date_text(self: *Self) -> String",
          "doc": "`YYYY-MM-DD`."
        },
        {
          "name": "time_text",
          "signature": "pub fn time_text(self: *Self) -> String",
          "doc": "`HH:MM:SS`."
        },
        {
          "name": "offset_text",
          "signature": "pub fn offset_text(self: *Self) -> String",
          "doc": "The offset as `Z`, or `+HH:MM` / `-HH:MM`."
        },
        {
          "name": "iso",
          "signature": "pub fn iso(self: *Self) -> String",
          "doc": "ISO 8601 / RFC 3339: `2026-09-19T04:15:14.123Z`, `...+02:00`."
        },
        {
          "name": "format",
          "signature": "pub fn format(self: *Self, spec: []u8) -> String",
          "doc": "strftime-style formatting: `%Y %m %d %H %M %S %3` (millis) `%z` (offset) `%a %b` (short day and month names) `%j` (day of year) `%%`. Unknown letters are copied through."
        },
        {
          "name": "parse_iso",
          "signature": "pub fn parse_iso(s: []u8) -> ?DateTime",
          "doc": "Parse `YYYY-MM-DD`, optionally followed by `THH:MM[:SS[.mmm]]` and an offset `Z` / `+HH:MM` / `-HH:MM`. Missing parts are zero; `null` when the text is not a date."
        },
        {
          "name": "millis",
          "signature": "pub fn millis(n: i64) -> Duration",
          "doc": ""
        },
        {
          "name": "seconds",
          "signature": "pub fn seconds(n: i64) -> Duration",
          "doc": ""
        },
        {
          "name": "minutes",
          "signature": "pub fn minutes(n: i64) -> Duration",
          "doc": ""
        },
        {
          "name": "hours",
          "signature": "pub fn hours(n: i64) -> Duration",
          "doc": ""
        },
        {
          "name": "days",
          "signature": "pub fn days(n: i64) -> Duration",
          "doc": ""
        },
        {
          "name": "between",
          "signature": "pub fn between(a: i64, b: i64) -> Duration",
          "doc": "The span from `a` to `b` (instants in ms)."
        },
        {
          "name": "since",
          "signature": "pub fn since(ms: i64) -> Duration",
          "doc": "The span from an instant to now."
        },
        {
          "name": "total_seconds",
          "signature": "pub fn total_seconds(self: *Self) -> f64",
          "doc": ""
        },
        {
          "name": "total_minutes",
          "signature": "pub fn total_minutes(self: *Self) -> f64",
          "doc": ""
        },
        {
          "name": "total_hours",
          "signature": "pub fn total_hours(self: *Self) -> f64",
          "doc": ""
        },
        {
          "name": "plus",
          "signature": "pub fn plus(self: *Self, other: Duration) -> Duration",
          "doc": ""
        },
        {
          "name": "minus",
          "signature": "pub fn minus(self: *Self, other: Duration) -> Duration",
          "doc": ""
        },
        {
          "name": "text",
          "signature": "pub fn text(self: *Self) -> String",
          "doc": "Human text: `250ms`, `3.5s`, `2m 05s`, `1h 02m`, `3d 04h`."
        },
        {
          "name": "add",
          "signature": "pub fn add(ms: i64, d: Duration) -> i64",
          "doc": "`instant + duration`."
        },
        {
          "name": "start",
          "signature": "pub fn start() -> Stopwatch",
          "doc": ""
        },
        {
          "name": "elapsed_ms",
          "signature": "pub fn elapsed_ms(self: *Self) -> f64",
          "doc": "Elapsed time in milliseconds, fractional."
        },
        {
          "name": "elapsed",
          "signature": "pub fn elapsed(self: *Self) -> Duration",
          "doc": "Elapsed time as a Duration (whole milliseconds)."
        },
        {
          "name": "lap",
          "signature": "pub fn lap(self: *mut Self) -> Duration",
          "doc": "Restart and return what had elapsed."
        }
      ]
    }
  ]
}