Debian Codegraph @

gcc/ada/libgnat/a-wichha.ads

raw
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
5 -- A D A . W I D E _ C H A R A C T E R S . H A N D L I N G --
6 -- --
7 -- S p e c --
8 -- --
9 -- This specification is derived from the Ada Reference Manual for use with --
10 -- GNAT. In accordance with the copyright of that document, you can freely --
11 -- copy and modify this specification, provided that if you redistribute a --
12 -- modified version, any changes that you have made are clearly indicated. --
13 -- --
14 ------------------------------------------------------------------------------
15
16 package Ada.Wide_Characters.Handling is
17 pragma Pure;
18
19 function Character_Set_Version return String;
20 pragma Inline (Character_Set_Version);
21 -- Returns an implementation-defined identifier that identifies the version
22 -- of the character set standard that is used for categorizing characters
23 -- by the implementation. For GNAT this is "Unicode v.v".
24
25 function Is_Control (Item : Wide_Character) return Boolean;
26 pragma Inline (Is_Control);
27 -- Returns True if the Wide_Character designated by Item is categorized as
28 -- other_control, otherwise returns False.
29
30 function Is_Letter (Item : Wide_Character) return Boolean;
31 pragma Inline (Is_Letter);
32 -- Returns True if the Wide_Character designated by Item is categorized as
33 -- letter_uppercase, letter_lowercase, letter_titlecase, letter_modifier,
34 -- letter_other, or number_letter. Otherwise returns False.
35
36 function Is_Lower (Item : Wide_Character) return Boolean;
37 pragma Inline (Is_Lower);
38 -- Returns True if the Wide_Character designated by Item is categorized as
39 -- letter_lowercase, otherwise returns False.
40
41 function Is_Upper (Item : Wide_Character) return Boolean;
42 pragma Inline (Is_Upper);
43 -- Returns True if the Wide_Character designated by Item is categorized as
44 -- letter_uppercase, otherwise returns False.
45
46 function Is_Basic (Item : Wide_Character) return Boolean;
47 pragma Inline (Is_Basic);
48 -- Returns True if the Wide_Character designated by Item has no
49 -- Decomposition Mapping in the code charts of ISO/IEC 10646:2017,
50 -- otherwise returns False.
51
52 function Is_Digit (Item : Wide_Character) return Boolean;
53 pragma Inline (Is_Digit);
54 -- Returns True if the Wide_Character designated by Item is categorized as
55 -- number_decimal, otherwise returns False.
56
57 function Is_Decimal_Digit (Item : Wide_Character) return Boolean
58 renames Is_Digit;
59
60 function Is_Hexadecimal_Digit (Item : Wide_Character) return Boolean;
61 -- Returns True if the Wide_Character designated by Item is categorized as
62 -- number_decimal, or is in the range 'A' .. 'F' or 'a' .. 'f', otherwise
63 -- returns False.
64
65 function Is_Alphanumeric (Item : Wide_Character) return Boolean;
66 pragma Inline (Is_Alphanumeric);
67 -- Returns True if the Wide_Character designated by Item is categorized as
68 -- letter_uppercase, letter_lowercase, letter_titlecase, letter_modifier,
69 -- letter_other, number_letter, or number_decimal; otherwise returns False.
70
71 function Is_Special (Item : Wide_Character) return Boolean;
72 pragma Inline (Is_Special);
73 -- Returns True if the Wide_Character designated by Item is categorized
74 -- as graphic_character, but not categorized as letter_uppercase,
75 -- letter_lowercase, letter_titlecase, letter_modifier, letter_other,
76 -- number_letter, or number_decimal. Otherwise returns False.
77
78 function Is_Line_Terminator (Item : Wide_Character) return Boolean;
79 pragma Inline (Is_Line_Terminator);
80 -- Returns True if the Wide_Character designated by Item is categorized as
81 -- separator_line or separator_paragraph, or if Item is a conventional line
82 -- terminator character (CR, LF, VT, or FF). Otherwise returns False.
83
84 function Is_Mark (Item : Wide_Character) return Boolean;
85 pragma Inline (Is_Mark);
86 -- Returns True if the Wide_Character designated by Item is categorized as
87 -- mark_non_spacing or mark_spacing_combining, otherwise returns False.
88
89 function Is_Other_Format (Item : Wide_Character) return Boolean;
90 pragma Inline (Is_Other_Format);
91 -- Returns True if the Wide_Character designated by Item is categorized as
92 -- other_format, otherwise returns False.
93
94 function Is_Punctuation_Connector (Item : Wide_Character) return Boolean;
95 pragma Inline (Is_Punctuation_Connector);
96 -- Returns True if the Wide_Character designated by Item is categorized as
97 -- punctuation_connector, otherwise returns False.
98
99 function Is_Space (Item : Wide_Character) return Boolean;
100 pragma Inline (Is_Space);
101 -- Returns True if the Wide_Character designated by Item is categorized as
102 -- separator_space, otherwise returns False.
103
104 function Is_NFKC (Item : Wide_Character) return Boolean;
105 pragma Inline (Is_NFKC);
106 -- Returns True if the Wide_Character designated by Item could be present
107 -- in a string normalized to Normalization Form KC (as defined by Clause
108 -- 21 of ISO/IEC 10646:2017), otherwise returns False.
109
110 function Is_Graphic (Item : Wide_Character) return Boolean;
111 pragma Inline (Is_Graphic);
112 -- Returns True if the Wide_Character designated by Item is categorized as
113 -- graphic_character, otherwise returns False.
114
115 function To_Lower (Item : Wide_Character) return Wide_Character;
116 pragma Inline (To_Lower);
117 -- Returns the Simple Lowercase Mapping of the Wide_Character designated by
118 -- Item. If the Simple Lowercase Mapping does not exist for the
119 -- Wide_Character designated by Item, then the value of Item is returned.
120
121 function To_Lower (Item : Wide_String) return Wide_String;
122 -- Returns the result of applying the To_Lower Wide_Character to
123 -- Wide_Character conversion to each element of the Wide_String designated
124 -- by Item. The result is the null Wide_String if the value of the formal
125 -- parameter is the null Wide_String.
126
127 function To_Upper (Item : Wide_Character) return Wide_Character;
128 pragma Inline (To_Upper);
129 -- Returns the Simple Uppercase Mapping of the Wide_Character designated by
130 -- Item. If the Simple Uppercase Mapping does not exist for the
131 -- Wide_Character designated by Item, then the value of Item is returned.
132
133 function To_Upper (Item : Wide_String) return Wide_String;
134 -- Returns the result of applying the To_Upper Wide_Character to
135 -- Wide_Character conversion to each element of the Wide_String designated
136 -- by Item. The result is the null Wide_String if the value of the formal
137 -- parameter is the null Wide_String.
138
139 function To_Basic (Item : Wide_Character) return Wide_Character;
140 pragma Inline (To_Basic);
141 -- Returns the Wide_Character whose code point is given by the first value
142 -- of its Decomposition Mapping in the code charts of ISO/IEC 10646:2017 if
143 -- any, returns Item otherwise.
144
145 function To_Basic (Item : Wide_String) return Wide_String;
146 -- Returns the result of applying the To_Basic conversion to each
147 -- Wide_Character element of the Wide_String designated by Item. The result
148 -- is the null Wide_String if the value of the formal parameter is the null
149 -- Wide_String. The lower bound of the result Wide_String is 1.
150
151 end Ada.Wide_Characters.Handling;