Top Prev Next Up Down

Y2018.Text.Core

Specification

001| package Y2018.Text.Core is
002| __type TRINITY is (TRI_TRUE,TRI_FALSE,TRI_UNDEF);
003| __type CodePoint is range 0 .. 2097151;
004| __for CodePoint'Size use 21;
005| __type CFix is Array(Positive range <>) of CodePoint;
006| __CodePoint_Space: constant CodePoint :=CodePoint'Val(16#20#);
007| __CodePoint_Replacement_Character: constant CodePoint :=CodePoint'Val(16#FFFD#);
008| __Null_CFixX : CFix(1 .. 0); -- used only for defining Null_CFix as a constant
009| __Null_CFix: constant CFix := Null_CFixX;
010| __CFix_Space:constant CFix:=(1=>CodePoint'Val(16#20#));
011| end Y2018.Text.Core;

Types
TRINITY
– a boolean like type but for three ‘logical’ values
CodePoint – unit for storing and accessing Unicode code point as one (21 bits).
CFix – an array type of Codepoint. Looks and works as Ada String

Constants
CodePoint_Space - blank but as codepoint
CodePoint_Replacement_Character - replacement character but as codepoint
Null_CFix - null length array of codepoints
CFix_Space - array of codepoints containing only a blank

Subpackages