SplitScript reference / [T] / isEmpty

[T].isEmpty

Method

[T].isEmpty() -> bool

Reports whether the array contains no elements.

This is ordinary library composition over [T].length; it does not require a separate runtime intrinsic.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Check for an empty array

let fieldNames: [String] = []
let hasNoFields = fieldNames.isEmpty()