Top Prev Next Up Down
Y2018.Text.Core
Tasks for merging text handling with these two formats,
8-bit/Character and 21-bit/Codepoint
- letter case support, convertion to lower, upper or title case
- &-operator, uses packages core.str, core.varpack and basic
Ada string suppport
- handling of hexadecimal, convertion to and from hexadecimal to
Integer and examples of covertion
- relation operator i.e. =, <, >, <=, >= . A
combination of core.str, core.varpack and native Ada
- functions
- subC - get part of the CFix, CVar or
String. A part not a slice, the first element has index value
1, except for a zero length part.
- rightC - get part of the CFix, CVar
or String and shift the result to right.
- leftC - get part of the CFix, CVar
or String and shift the result to left.
- centerC get part of the CFix, CVar
or String and center the result.
- stripC - strip or trim the result
- reverseC - reverse the order of
codepoint entities in the result
- multirow handling through a CList map
- handling of multiple rows in a Ada.Containers.Ordered_Maps
Outside of these we find function Get_GC
for retrieving General Class for a specific codepoint, and the Core.UTF functions for
conversions between UTF-8 (bit-8) and Codepoint (bit-21).
ADA has Character constants (8-bit) but lacks constants for 21-bit.
If we enlarge ADA with 21-bit constant codepoint encoding by writing
"Ada"c for a CFix constant and 'A'c for a Codepoint constant it will be
much easier to program allthough we have to preprocress the code
before we compile it with gnatmake. With the preprocessor we
can also get notation for \b (BS), \f (FF), \n (LF),
\d (CR) and \t
(HT or TAB) and hexadecimal values in CFix- ('Codepoint'-)
strings by writing \xHH, \uHHHH or \vHHHHHH where 'H' stands for a
hexadecimal digit (0123456789ABCDEF). But we have to escape
backslash (\) with an extra backslash.
A feature found in many programming languages, C, Java,.. but not in
ADA 2012.
- ExOmega.adb : to create program
without the preprocessor
- ExPsi.adb : to create program using
the preprocessor. More about preprocessor CCompile.
ADA specification of package Y2018.Text.Core
.
Utility for scanning UTF-8 files to a readable form for an editor, Chesslist, and the code Chesslist.adb.