Skip to main content

Module strings

Module strings 

Source
Expand description

String utilities — Windjammer std::strings maps here.

Functions§

byte_at
ASCII byte at index (for line-oriented parsers on .wjscene files).
chars
Unicode characters in a string (for editor widgets, parsers, etc.).
contains
Check if string contains substring
ends_with
Check if string ends with suffix
from_chars
Build a string from character codepoints.
is_empty
Check if string is empty
join
Join strings with delimiter
len
Get string length in bytes
parse_bool
Parse bool from "true" / "false".
parse_f32
Parse float (returns 0.0 on failure).
parse_i32
Parse signed integer (returns 0 on failure — matches legacy scene parser).
replace
Replace all occurrences
split
Split string by delimiter
split_lines
Split text into lines (\n / \r\n — no .as_bytes() needed in Windjammer).
split_whitespace
Split on ASCII whitespace (space / tab).
starts_with
Check if string starts with prefix
substring
Get substring from start to end index (exclusive)
substring_chars
Substring by character indices [start, end).
to_lower
Convert to lowercase
to_upper
Convert to uppercase
trim
Trim whitespace
trim_end
Trim whitespace from end
trim_start
Trim whitespace from start