class
TermBuf::ClusterPool
- TermBuf::ClusterPool
- Reference
- Object
Overview
Interns multi code point grapheme clusters so a Cell can carry a four
byte id rather than a string reference. Id zero means the cell's own
character says everything, which is the case for all but a handful of
cells in practice.
Defined in:
termbuf/core/style_table.crConstant Summary
-
NONE =
0_u32 -
The id meaning "no cluster; read the cell's character instead".
Constructors
Instance Method Summary
-
#[](id : UInt32) : String
The cluster id refers to.
-
#[]?(id : UInt32) : String | Nil
The cluster id refers to, or
nilforNONE. -
#id(text : String) : UInt32
The id for text, assigning one if this is the first time it is seen.
-
#size : Int32
How many clusters have been interned.
Constructor Detail
Instance Method Detail
def id(text : String) : UInt32
#
The id for text, assigning one if this is the first time it is seen.