Skip to content

ScriptSet

[Source]

class val ScriptSet

Constructors

create

[Source]

Build a set from a (possibly-unsorted, possibly-duplicate) list of scripts.

new val create(
  scripts: Array[Script] val)
: ScriptSet val^

Parameters

Returns


empty

[Source]

The empty set — useful as a starting point for unions.

new val empty()
: ScriptSet val^

Returns


Public Functions

size

[Source]

fun box size()
: USize val

Returns


contains

[Source]

True iff s is in this set.

fun box contains(
  s: Script)
: Bool val

Parameters

Returns


to_array

[Source]

Return the scripts in this set as an Array[Script] val, in the same byte-sorted order the set stores internally.

fun box to_array()
: Array[Script] val

Returns


resolved

[Source]

The set with Common and Inherited removed. Useful for the "which actual scripts does this text use?" question — those two fit anything and rarely belong in the answer.

fun box resolved()
: ScriptSet val

Returns


bytes

[Source]

Package-private view of the underlying sorted byte array. Used by Scripts.restrict_to to avoid re-encoding scripts on every cp.

fun box bytes()
: Array[U8 val] val

Returns