hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit f1f94af1cd8414babbbfb615037ea3cd6b5cf87c
parent f8048538f650a7560853d51b619cd93a7c239786
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat,  2 Apr 2022 00:06:44 -0400

all: remove unnecessary module prefixes in docs

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mfmt/fmt.ha | 4++--
Mfnmatch/fnmatch.ha | 11+++++------
Mfs/fs.ha | 2+-
Mio/+linux/file.ha | 2+-
Mio/README | 27+++++++++++++--------------
Mio/limit.ha | 2+-
Mio/types.ha | 8++++----
Miobus/io_uring/ops.ha | 2+-
Mnet/errors.ha | 2+-
Mos/exec/cmd.ha | 10+++++-----
Mstrconv/stof.ha | 20++++++++++----------
Mstrconv/stoi.ha | 40++++++++++++++++++++--------------------
Mstrconv/stou.ha | 66++++++++++++++++++++++++++++++------------------------------------
Mstrconv/utos.ha | 2+-
Mstrings/tokenize.ha | 7+++----
15 files changed, 98 insertions(+), 107 deletions(-)

diff --git a/fmt/fmt.ha b/fmt/fmt.ha @@ -14,8 +14,8 @@ use strconv; use strings; use types; -// Tagged union of the [[fmt::formattable]] types and [[fmt::modifiers]]. Used -// for functions which accept format strings. +// Tagged union of the [[formattable]] types and [[modifiers]]. Used for +// functions which accept format strings. export type field = (...formattable | *modifiers); // Tagged union of all types which are formattable. diff --git a/fnmatch/fnmatch.ha b/fnmatch/fnmatch.ha @@ -10,7 +10,7 @@ use errors; use strings; use sort; -// A set of flags that alter the matching behavior of [[fnmatch::fnmatch]] +// A set of flags that alter the matching behavior of [[fnmatch]] export type flags = enum uint { NONE = 0, @@ -21,9 +21,9 @@ export type flags = enum uint { // character NOESCAPE = 1u << 1, // If this flag is set, a '.' at the beginning of the string can only - // be matched by a literal '.' in the pattern. If - // [[fnmatch::flags::PATHNAME]] is set simultaneously, this behavior also - // apply to any periods immediately following a slash. + // be matched by a literal '.' in the pattern. If [[flags::PATHNAME]] is + // set simultaneously, this behavior also apply to any periods + // immediately following a slash. PERIOD = 1u << 2, }; @@ -43,8 +43,7 @@ type token = (rune | bracket | star | question | end); // - all other characters only match themselves // // A set of flags that alter the matching behavior may be passed to -// [[fnmatch::fnmatch]]. For an explanation of their meaning, see -// [[fnmatch::flags]]. +// [[fnmatch]]. For an explanation of their meaning, see [[flags]]. export fn fnmatch(pattern: str, string: str, flag: flags...) bool = { let fl: flags = 0; for (let i = 0z; i < len(flag); i += 1) { diff --git a/fs/fs.ha b/fs/fs.ha @@ -287,5 +287,5 @@ export fn symlink(fs: *fs, target: str, path: str) (void | error) = { // Returns the next directory entry from an interator, or void if none remain. // It is a programming error to call this again after it has returned void. The // file stat returned may only have the type bits set on the file mode; callers -// should call [[fs::stat]] to obtain the detailed file mode. +// should call [[stat]] to obtain the detailed file mode. export fn next(iter: *iterator) (dirent | void) = iter.next(iter); diff --git a/io/+linux/file.ha b/io/+linux/file.ha @@ -11,7 +11,7 @@ use strings; // require a [[file]] with some OS-level handle backing it - this type is used // for such APIs. // -// On Linux, [[io::file]] is a file descriptor. +// On Linux, [[file]] is a file descriptor. export type file = int; // Opens a Unix file descriptor as a file. This is a low-level interface, to diff --git a/io/README b/io/README @@ -3,21 +3,20 @@ such as reading from or writing to files. The I/O module is not generally responsible for provisioning the I/O objects themselves; see modules like [[os]] and [[net]] for this purpose. -I/O operations such as [[read]] or [[write]] accept an I/O handle, -[[io::handle]], to specify the object of the I/O operation. This type is a -tagged union of [[io::file]] and *[[io::stream]]. Most programmers should prefer -to use [[io::handle]] unless they specifically require the special semantics of -one of its subtypes. +I/O operations such as [[read]] or [[write]] accept an I/O handle, [[handle]], +to specify the object of the I/O operation. This type is a tagged union of +[[file]] and *[[stream]]. Most programmers should prefer to use [[handle]] +unless they specifically require the special semantics of one of its subtypes. -The [[io::file]] type provides access to an object, usually a file descriptor, -which is provided by the host operating system. It represents objects such as a -file on disk, an open network connection, and so on. The use of [[io::file]] is -generally required when working with host I/O, such as for modules like -[[iobus]] or [[unix::poll]]. +The [[file]] type provides access to an object, usually a file descriptor, which +is provided by the host operating system. It represents objects such as a file +on disk, an open network connection, and so on. The use of [[file]] is generally +required when working with host I/O, such as for modules like [[iobus]] or +[[unix::poll]]. -The [[io::stream]] type is an abstraction that allows Hare programs to implement +The [[stream]] type is an abstraction that allows Hare programs to implement their own I/O objects by providing implementations of [[read]], [[write]], and -other functions, for an [[io::handle]]. Several standard library modules offer -implementations of [[io::stream]] for one reason or another, such as [[bufio]]. +other functions, for an [[handle]]. Several standard library modules offer +implementations of [[stream]] for one reason or another, such as [[bufio]]. Additionally, the io module provides some useful general-purpose I/O streams, -such as [[io::tee]]. +such as [[tee]]. diff --git a/io/limit.ha b/io/limit.ha @@ -20,7 +20,7 @@ fn limitstream_create(source: handle, limit: size) limitstream = { // Create an overlay stream that only allows a limited amount of bytes to be // read from the underlying stream. This stream does not need to be closed, and // closing it does not close the underlying stream. Reading any data beyond the -// given limit causes the reader to return [[io::EOF]]. +// given limit causes the reader to return [[EOF]]. export fn limitreader(source: handle, limit: size) limitstream = { let stream = limitstream_create(source, limit); stream.reader = &limit_read; diff --git a/io/types.ha b/io/types.ha @@ -54,13 +54,13 @@ export type closer = fn(s: *stream) void; // The interface for a stream which has first-class support for copying data // from another stream. Often this only works if the second stream is of the -// same underlying stream type. This is optional, [[io::copy]] still works even -// with a stream which does not implement this (it falls back to calling read -// and write in a loop). +// same underlying stream type. This is optional, [[copy]] still works even with +// a stream which does not implement this (it falls back to calling read and +// write in a loop). // // Returns the number of bytes copied, or an error if one occured. Do not close // either stream. If the operation is unsupported for this particular pair of -// streams, return [[errors::unsupported]] to have [[io::copy]] proceed with its +// streams, return [[errors::unsupported]] to have [[copy]] proceed with its // fallback implementation. export type copier = fn(to: *stream, from: *stream) (size | error); diff --git a/iobus/io_uring/ops.ha b/iobus/io_uring/ops.ha @@ -258,7 +258,7 @@ export fn create( return handle; }; -// Returns the new file handle from an [[create]] operation. +// Returns the new file handle from a [[create]] operation. export fn endcreate(bus: *bus, res: result) (io::file | error) = { let handle = handleof(res); assert(handle.sqe.opcode == io_uring::op::OPENAT, diff --git a/net/errors.ha b/net/errors.ha @@ -11,7 +11,7 @@ export type unknownproto = !void; // All error types which can be returned from networking functions. export type error = !(unknownproto | ...errors::error); -// Converts a [[net::error]] into a human-readable string. +// Converts an [[error]] into a human-readable string. export fn strerror(err: error) const str = { match (err) { case unknownproto => diff --git a/os/exec/cmd.ha b/os/exec/cmd.ha @@ -131,12 +131,12 @@ export fn setenv(cmd: *command, key: str, value: str) void = { // exec::addfile(&cmd, os::stderr, os::stdout_file); // exec::addfile(&cmd, os::stdout_file, os::stderr); // -// Pass [[os::exec::nullfd]] in the 'from' argument to map the child's file -// descriptor to /dev/null or the appropriate platform-specific equivalent. +// Pass [[nullfd]] in the 'from' argument to map the child's file descriptor to +// /dev/null or the appropriate platform-specific equivalent. // -// Pass [[os::exec::closefd]] in the 'from' argument to close a file descriptor -// which was not opened with the CLOEXEC flag. Note that Hare opens all files -// with CLOEXEC by default, so this is not usually necessary. +// Pass [[closefd]] in the 'from' argument to close a file descriptor which was +// not opened with the CLOEXEC flag. Note that Hare opens all files with CLOEXEC +// by default, so this is not usually necessary. // // To write to a process's stdin, capture its stdout, or pipe two programs // together, see the [[pipe]] function. diff --git a/strconv/stof.ha b/strconv/stof.ha @@ -531,11 +531,11 @@ fn stof32exact(mant: u32, exp: i32, neg: bool) (f32 | void) = { }; // Converts a string to a f64. If the string is not syntactically well-formed -// floating-point number in base 10, [[strconv::invalid]] is returned. If the -// string represents a floating-point number that is larger than the largest -// finite f64 number, [[strconv::overflow]] is returned. Zero is returned if the -// string represents a floating-point number that is smaller than the f64 number -// nearest to zero with respective sign. +// floating-point number in base 10, [[invalid]] is returned. If the string +// represents a floating-point number that is larger than the largest finite f64 +// number, [[overflow]] is returned. Zero is returned if the string represents a +// floating-point number that is smaller than the f64 number nearest to zero +// with respective sign. export fn stof64(s: str) (f64 | invalid | overflow) = { const p = fast_parse(s)?; if (p is fast_parsed_float) { @@ -560,11 +560,11 @@ export fn stof64(s: str) (f64 | invalid | overflow) = { }; // Converts a string to a f32. If the string is not syntactically well-formed -// floating-point number in base 10, [[strconv::invalid]] is returned. If the -// string represents a floating-point number that is larger than the largest -// finite f64 number, [[strconv::overflow]] is returned. Zero is returned if the -// string represents a floating-point number that is smaller than the f32 number -// nearest to zero with respective sign. +// floating-point number in base 10, [[invalid]] is returned. If the string +// represents a floating-point number that is larger than the largest finite f64 +// number, [[overflow]] is returned. Zero is returned if the string represents a +// floating-point number that is smaller than the f32 number nearest to zero +// with respective sign. export fn stof32(s: str) (f32 | invalid | overflow) = { const p = fast_parse(s)?; if (p is fast_parsed_float) { diff --git a/strconv/stoi.ha b/strconv/stoi.ha @@ -8,8 +8,8 @@ use strings; // Converts a string to an i64 in the given base. If the string contains any // non-numeric characters, except '-' or '+' at the start, or if it's empty, -// [[strconv::invalid]] is returned. If the number is too large to be represented -// by an i64, [[strconv::overflow]] is returned. +// [[invalid]] is returned. If the number is too large to be represented by an +// i64, [[overflow]] is returned. export fn stoi64b(s: str, base: uint) (i64 | invalid | overflow) = { if (len(s) == 0) return 0: invalid; let b = strings::toutf8(s); @@ -33,8 +33,8 @@ export fn stoi64b(s: str, base: uint) (i64 | invalid | overflow) = { // Converts a string to an i32 in the given base. If the string contains any // non-numeric characters, except '-' or '+' at the start, or if it's empty, -// [[strconv::invalid]] is returned. If the number is too large to be represented -// by an i32, [[strconv::overflow]] is returned. +// [[invalid]] is returned. If the number is too large to be represented by an +// i32, [[overflow]] is returned. export fn stoi32b(s: str, base: uint) (i32 | invalid | overflow) = { let n = stoi64b(s, base)?; if (n >= types::I32_MIN: i64 && n <= types::I32_MAX: i64) { @@ -45,8 +45,8 @@ export fn stoi32b(s: str, base: uint) (i32 | invalid | overflow) = { // Converts a string to an i16 in the given base. If the string contains any // non-numeric characters, except '-' or '+' at the start, or if it's empty, -// [[strconv::invalid]] is returned. If the number is too large to be represented -// by an i16, [[strconv::overflow]] is returned. +// [[invalid]] is returned. If the number is too large to be represented by an +// i16, [[overflow]] is returned. export fn stoi16b(s: str, base: uint) (i16 | invalid | overflow) = { let n = stoi64b(s, base)?; if (n >= types::I16_MIN: i64 && n <= types::I16_MAX: i64) { @@ -57,8 +57,8 @@ export fn stoi16b(s: str, base: uint) (i16 | invalid | overflow) = { // Converts a string to an i8 in the given base. If the string contains any // non-numeric characters, except '-' or '+' at the start, or if it's empty, -// [[strconv::invalid]] is returned. If the number is too large to be represented -// by an i8, [[strconv::overflow]] is returned. +// [[invalid]] is returned. If the number is too large to be represented by an +// i8, [[overflow]] is returned. export fn stoi8b(s: str, base: uint) (i8 | invalid | overflow) = { let n= stoi64b(s, base)?; if (n >= types::I8_MIN: i64 && n <= types::I8_MAX: i64) { @@ -69,8 +69,8 @@ export fn stoi8b(s: str, base: uint) (i8 | invalid | overflow) = { // Converts a string to an int in the given base. If the string contains any // non-numeric characters, except '-' or '+' at the start, or if it's empty, -// [[strconv::invalid]] is returned. If the number is too large to be represented -// by an int, [[strconv::overflow]] is returned. +// [[invalid]] is returned. If the number is too large to be represented by an +// int, [[overflow]] is returned. export fn stoib(s: str, base: uint) (int | invalid | overflow) = { static assert(size(int) == size(i32) || size(int) == size(i64)); return @@ -79,31 +79,31 @@ export fn stoib(s: str, base: uint) (int | invalid | overflow) = { }; // Converts a string to an i64 in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by an i64, [[strconv::overflow]] is +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by an i64, [[overflow]] is // returned. export fn stoi64(s: str) (i64 | invalid | overflow) = stoi64b(s, 10); // Converts a string to an i32 in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by an i32, [[strconv::overflow]] is +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by an i32, [[overflow]] is // returned. export fn stoi32(s: str) (i32 | invalid | overflow) = stoi32b(s, 10); // Converts a string to an i16 in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by an i16, [[strconv::overflow]] is +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by an i16, [[overflow]] is // returned. export fn stoi16(s: str) (i16 | invalid | overflow) = stoi16b(s, 10); // Converts a string to an i8 in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by an i8, [[strconv::overflow]] is +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by an i8, [[overflow]] is // returned. export fn stoi8(s: str) (i8 | invalid | overflow) = stoi8b(s, 10); // Converts a string to an int in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by an int, [[strconv::overflow]] is +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by an int, [[overflow]] is // returned. export fn stoi(s: str) (int | invalid | overflow) = stoib(s, 10); diff --git a/strconv/stou.ha b/strconv/stou.ha @@ -17,9 +17,9 @@ fn rune_to_integer(r: rune) (u64 | void) = { }; // Converts a string to a u64 in the given base, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a u64, [[strconv::overflow]] is -// returned. Supported bases are 2, 8, 10 and 16. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a u64, [[overflow]] is returned. +// Supported bases are 2, 8, 10 and 16. export fn stou64b(s: str, base: uint) (u64 | invalid | overflow) = { assert(base == 2 || base == 8 || base == 10 || base == 16); @@ -61,9 +61,9 @@ export fn stou64b(s: str, base: uint) (u64 | invalid | overflow) = { }; // Converts a string to a u32 in the given base, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a u32, [[strconv::overflow]] is -// returned. Supported bases are 2, 8, 10 and 16. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a u32, [[overflow]] is returned. +// Supported bases are 2, 8, 10 and 16. export fn stou32b(s: str, base: uint) (u32 | invalid | overflow) = { let n = stou64b(s, base)?; if (n <= types::U32_MAX: u64) { @@ -73,9 +73,9 @@ export fn stou32b(s: str, base: uint) (u32 | invalid | overflow) = { }; // Converts a string to a u16 in the given base, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a u16, [[strconv::overflow]] is -// returned. Supported bases are 2, 8, 10 and 16. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a u16, [[overflow]] is returned. +// Supported bases are 2, 8, 10 and 16. export fn stou16b(s: str, base: uint) (u16 | invalid | overflow) = { let n = stou64b(s, base)?; if (n <= types::U16_MAX: u64) { @@ -85,9 +85,9 @@ export fn stou16b(s: str, base: uint) (u16 | invalid | overflow) = { }; // Converts a string to a u8 in the given base, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a u8, [[strconv::overflow]] is -// returned. Supported bases are 2, 8, 10 and 16. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a u8, [[overflow]] is returned. +// Supported bases are 2, 8, 10 and 16. export fn stou8b(s: str, base: uint) (u8 | invalid | overflow) = { let n = stou64b(s, base)?; if (n <= types::U8_MAX: u64) { @@ -97,9 +97,9 @@ export fn stou8b(s: str, base: uint) (u8 | invalid | overflow) = { }; // Converts a string to a uint in the given base, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a uint, [[strconv::overflow]] is -// returned. Supported bases are 2, 8, 10 and 16. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a uint, [[overflow]] is returned. +// Supported bases are 2, 8, 10 and 16. export fn stoub(s: str, base: uint) (uint | invalid | overflow) = { static assert(size(uint) == size(u32) || size(uint) == size(u64)); return @@ -108,9 +108,9 @@ export fn stoub(s: str, base: uint) (uint | invalid | overflow) = { }; // Converts a string to a size in the given base, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a size, [[strconv::overflow]] is -// returned. Supported bases are 2, 8, 10 and 16. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a size, [[overflow]] is returned. +// Supported bases are 2, 8, 10 and 16. export fn stozb(s: str, base: uint) (size | invalid | overflow) = { static assert(size(size) == size(u32) || size(size) == size(u64)); if (size(size) == size(u32)) { @@ -131,37 +131,31 @@ export fn stozb(s: str, base: uint) (size | invalid | overflow) = { }; // Converts a string to a u64 in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a u64, [[strconv::overflow]] is -// returned. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a u64, [[overflow]] is returned. export fn stou64(s: str) (u64 | invalid | overflow) = stou64b(s, 10); // Converts a string to a u32 in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a u32, [[strconv::overflow]] is -// returned. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a u32, [[overflow]] is returned. export fn stou32(s: str) (u32 | invalid | overflow) = stou32b(s, 10); // Converts a string to a u16 in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a u16, [[strconv::overflow]] is -// returned. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a u16, [[overflow]] is returned. export fn stou16(s: str) (u16 | invalid | overflow) = stou16b(s, 10); // Converts a string to a u8 in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a u8, [[strconv::overflow]] is -// returned. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a u8, [[overflow]] is returned. export fn stou8(s: str) (u8 | invalid | overflow) = stou8b(s, 10); // Converts a string to a uint in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a uint, [[strconv::overflow]] is -// returned. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a uint, [[overflow]] is returned. export fn stou(s: str) (uint | invalid | overflow) = stoub(s, 10); // Converts a string to a size in base 10, If the string contains any -// non-numeric characters, or if it's empty, [[strconv::invalid]] is returned. If -// the number is too large to be represented by a size, [[strconv::overflow]] is -// returned. +// non-numeric characters, or if it's empty, [[invalid]] is returned. If the +// number is too large to be represented by a size, [[overflow]] is returned. export fn stoz(s: str) (size | invalid | overflow) = stozb(s, 10); diff --git a/strconv/utos.ha b/strconv/utos.ha @@ -97,7 +97,7 @@ export fn utos(u: uint) const str = u64tos(u); // Converts a size to a string in base 10. The return value is statically // allocated and will be overwritten on subsequent calls; see [[strings::dup]] to -// duplicate the result, or [[strconv::itosb]] to pass your own string buffer. +// duplicate the result, or [[itosb]] to pass your own string buffer. export fn ztos(z: size) const str = u64tos(z); // Converts a uintptr to a string in base 10. The return value is statically diff --git a/strings/tokenize.ha b/strings/tokenize.ha @@ -97,8 +97,8 @@ export fn remaining_tokens(s: *tokenizer) str = { // Splits a string into tokens delimited by 'delim', returning a slice of up to // N tokens. The caller must free this slice. The strings within the slice are -// borrowed from 'in', and needn't be freed - but should be [[strings::dupall]]'d -// if they should outlive 'in'. +// borrowed from 'in', and needn't be freed - but should be [[dupall]]'d if they +// should outlive 'in'. export fn splitn(in: str, delim: str, n: size) []str = { let toks: []str = alloc([]); let tok = tokenize(in, delim); @@ -116,8 +116,7 @@ export fn splitn(in: str, delim: str, n: size) []str = { // Splits a string into tokens delimited by 'delim'. The caller must free the // returned slice. The strings within the slice are borrowed from 'in', and -// needn't be freed - but must be [[strings::dupall]]'d if they should outlive -// 'in'. +// needn't be freed - but must be [[dupall]]'d if they should outlive 'in'. export fn split(in: str, delim: str) []str = splitn(in, delim, types::SIZE_MAX); @test fn split() void = {