SplitScript reference / Migration / Collection count
Collection count
Migration from C#
Source pattern
Look for the C# concept Collection count in the source. The semantic difference below is more important than a token-for-token rewrite.
Canonical SplitScript
Use the canonical language and API symbols linked below.
Semantic difference
After choosing an array or set from the source's ordering and uniqueness requirements, call values.length() for its u32 count.
Supported hosts
This uses the standard SplitScript runtime contract. Any provider-specific requirements are documented by the linked canonical API.
Related reference
-
[T].length (standard library)
-
Set.length (standard library)