Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit17bb9a973f

README.md

launcher.wording

The words the ZeroMind tab prints from what ZeroMind answers. Every function is pure and reads the language through i18n.

  • epochOf(stamp) -> number?: an ISO-8601 time (2026-09-08T13:03:22Z) as seconds since the epoch, read as UTC; nil for a time that does not read.
  • dateOf(stamp) -> string? and monthOf(stamp) -> string?: the day, and the month and year, a time falls on, in the language's own form.
  • clampText(text, width, fontSize, lines) -> string: text cut to about the words lines lines of width points hold at fontSize, ending in an ellipsis when it was cut.
  • count(n, noun) -> string: n and the noun it counts (world, part, agent, file, asset, launch, fork, comment, world_use), in the form the language gives it.
  • plainText(markdown, limit) -> (string, boolean): the first paragraphs of a README as plain text, and whether it was cut at limit characters.
local Wording = require("@builtin::modules.api.engine.launcher.wording")
assert(Wording.epochOf("1970-01-02T00:00:00Z") == 86400)
assert(Wording.epochOf("yesterday") == nil)
local text, cut = Wording.plainText("# Title\n\nSome **bold** words.", 200)
assert(text == "Title\n\nSome bold words." and cut == false)