QuakeServer.Extensions.Buffers (quake_server v0.1.0)

Copy Markdown View Source

FTE's string buffer builtins beyond making, reading and writing single strings (QuakeServer.Extensions.Store):

  • buf_copy (463) — the second buffer replaced by a copy of the first
  • buf_sort (464) — empty places dropped, then the strings sorted by their first prefix bytes (all when 0 or less), backwards when the third argument is set
  • bufstr_find (537) — the first index from start, stepping by step, whose string matches: method 1 exact, 2 starts with, 3 ends with, 4 contains, else a wildcard pattern (* stops at / and \, ? one character, case ignored); -1 for none
  • buf_loadfile (535) — a file's lines added to a buffer (1, or 0 when the buffer or file is missing or the name refused, QuakeServer.Extensions.Files.fix_name/1)
  • buf_writefile (536) — a buffer's strings, from an index for a count, written to a file open for writing, each followed by a newline (1, or 0 when either is missing)

Summary

Functions

Run string buffer builtin builtin.

Whether text matches wildcard pattern as FTE's wildcmp: * stops at / and \, ? is any one character, case ignored.

Functions

call(s, int, argc)

@spec call(map(), integer(), non_neg_integer()) :: map()

Run string buffer builtin builtin.

wildcard?(pattern, text)

@spec wildcard?(binary(), binary()) :: boolean()

Whether text matches wildcard pattern as FTE's wildcmp: * stops at / and \, ? is any one character, case ignored.