From a9e4e9f0167ed344e55ba298928a575cabb1de0d Mon Sep 17 00:00:00 2001 From: nodist Date: Sun, 24 May 2026 17:24:28 -0400 Subject: add format string example --- docs/syntax/operators.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'docs/syntax/operators.md') diff --git a/docs/syntax/operators.md b/docs/syntax/operators.md index b36f44b..33334b2 100644 --- a/docs/syntax/operators.md +++ b/docs/syntax/operators.md @@ -11,11 +11,47 @@ ## ``print` ```text -Result[I32] : Is[File; Void] `print DATA +Result[I32] : Is[File; Void] `print Any ``` If no `File` is specified the output is send to `stdout` +## ``format` + +```text +Result[String] : Const[String]`format Any +``` + +### Formatting + +#### Replace + +Use `%` to indicate an item from `Any`, use `\%` for a literal `%` + +#### Colors + +Use `#NAME#` to change the text color, use `#` to reset the text color, use `\#` for a literal `#` + +```text +BOLD +FAINT +ITALIC +UNDERLINE - UL + +BACKGROUND - BG +LIGHT + +BLACK +RED +GREEN +YELLOW +BLUE +MAGENTA +CYAN +GREY +WHITE +``` + ## ``panic` Stops execution and prints `Any` to `stdout` -- cgit v1.2.3