Expand description
String utilities — Windjammer std::strings maps here.
Functions§
- byte_at
- ASCII byte at index (for line-oriented parsers on
.wjscenefiles). - 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