String

UTF-8 text utilities, string views, owned strings, and formatting helpers.


Char

Single Unicode code point wrapper used by UTF-8 decoding and string construction helpers.

Related values and helpers

Examples

"String" use
"control" use

{} () {} [
  65i32 toChar .codepoint printStack _:;
] "main" exportFunction

Expected Output During Compilation

65 Cref

StringView

Non-owning UTF-8 view built from item data and item count.

Constructors and converters

Examples

"String" use
"control" use

{} () {} [
  view: "hi" makeStringView;
  view.size printStack _:;
] "main" exportFunction

Expected Output During Compilation

2

String

Owned mutable UTF-8 string built on Nat8 Array.

Core fields and methods

Appending without restoring the terminator

Appending with terminator restoration

Formatting markers

Terminator helpers

Deprecated field

Examples

"String" use
"control" use

{} () {} [
  text: "abc" toString;
  text.size printStack _:;
  @text.getStringView.size printStack _:;
] "main" exportFunction

Expected Output During Compilation

Int32
Int32

Formatting Example

"String" use
"control" use

{} Int32 {} [
  text: String;
  (123456 By3 ", " 255 Hex) @text.catMany
  @text.getStringView print
  0
] "main" exportFunction

Expected Output

123,456, FF

Text helpers

splitString result fields

Examples

"String" use
"control" use

{} () {} [
  parts: "你好" splitString;
  parts.success printStack _:;
  parts.chars.size printStack _:;
] "main" exportFunction

Expected Output During Compilation

Cond Cref
Int32

Printing Example

"String" use
"control" use

{} Int32 {} [
  ("left=" 42) printList
  0
] "main" exportFunction

Expected Output

left=42

UTF-8 helpers


See also