SplitScript reference / String / isEmpty

String.isEmpty

Method

String.isEmpty() -> bool

Reports whether this string contains no UTF-8 bytes.

String itself is never absent. Use ordinary match on an optional string (T?) when absence and emptiness should both satisfy a condition.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Ignore an empty checkpoint name

let hasCheckpoint = !"Forest".isEmpty()