hcl/lib2/h3-cc.ads
hyung-hwan ef734a5bc1 Is_Code in H3.CC.
Use Wide_Character'First instead of Wide_Character'Val(0) 
Removed the terminator parameter in the H3.Strings
2021-10-27 15:34:30 +00:00

38 lines
1.6 KiB
Ada

generic
type Item_Type is (<>); -- any discrete type
package H3.CC is
-- <ctype.h>-like character classification package
-- unicode-based. no system locale honored.
subtype Item_Code is H3.Natural;
Colon: constant Item_Code := System_Character'Pos(':');
SemicoloN: constant Item_Code := System_Character'Pos(';');
Tilde: constant Item_Code := System_Character'Pos('~');
Underline: constant Item_Code := System_Character'Pos('_');
Equal: constant Item_Code := System_Character'Pos('=');
L_Arrow: constant Item_Code := System_Character'Pos('<');
R_Arrow: constant Item_Code := System_Character'Pos('>');
type Class is (ALPHA, ALNUM, BLANK, CNTRL, DIGIT, GRAPH, LOWER, PRINT, PUNCT, SPACE, UPPER, XDIGIT);
function Is_Class (V: in Item_Type; Cls: in Class) return Boolean;
function Is_Alpha (V: in Item_Type) return Boolean;
function Is_Alnum (V: in Item_Type) return Boolean;
function Is_Blank (V: in Item_Type) return Boolean;
function Is_Cntrl (V: in Item_Type) return Boolean;
function Is_Digit (V: in Item_Type) return Boolean;
function Is_Graph (V: in Item_Type) return Boolean;
function Is_Print (V: in Item_Type) return Boolean;
function Is_Punct (V: in Item_Type) return Boolean;
function Is_Space (V: in Item_Type) return Boolean;
function Is_Xdigit (V: in Item_Type) return Boolean;
function Is_Lower (V: in Item_Type) return Boolean;
function Is_Upper (V: in Item_Type) return Boolean;
function To_Lower (V: in Item_Type) return Item_Type;
function To_Upper (V: in Item_Type) return Item_Type;
function Is_Code (V: in Item_Type; Code: in Item_Code) return Boolean;
end H3.CC;