Skip to documentation
SplitScript
  • Language
  • Standard library
  • Guides
  • Migration

SplitScript reference / Set / length

Set.length

Method

Set<T>.length() -> u32 where T: Equatable

Returns the number of stored values.

Duplicate insertions do not increase the count.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Count visited rooms

let visited = Set.new<String>()
let roomCount = visited.length()
Generated from the SplitScript compiler's documentation catalogs.