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
- Y2018.Text.Core.C32 - table for converting 8 to 21 bit
- Y2018.Text.Core.C8 - table for converting 21 to 8 bit
- Y2018.Text.Core.CVarpack
- a variable length 'CFix' called CVar with supporting
functions.
- Y2018.Text.Core.GC - tables (a and u) for connecting General
Code value to codepoint
- Y2018.Text.Core.Str -
package of the string support where a 'string' contains 21-bit
entities (CFix) and oveloading of operations between UTF-8
(8-bits) and CFix and CVar.
- Y2018.Text.Core.Ultcase - table for converting between upper,
lower and title case
- Y2018.Text.Core.UTF -
conversion between UTF-8 and Codepoint (21-bit) and support