111
|
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
|
145
|
28 -- other_control, otherwise returns False.
|
111
|
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,
|
145
|
34 -- letter_other, or number_letter. Otherwise returns False.
|
111
|
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
|
145
|
39 -- letter_lowercase, otherwise returns False.
|
111
|
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
|
145
|
44 -- letter_uppercase, otherwise returns False.
|
111
|
45
|
|
46 function Is_Digit (Item : Wide_Character) return Boolean;
|
|
47 pragma Inline (Is_Digit);
|
|
48 -- Returns True if the Wide_Character designated by Item is categorized as
|
145
|
49 -- number_decimal, otherwise returns False.
|
111
|
50
|
|
51 function Is_Decimal_Digit (Item : Wide_Character) return Boolean
|
|
52 renames Is_Digit;
|
|
53
|
|
54 function Is_Hexadecimal_Digit (Item : Wide_Character) return Boolean;
|
|
55 -- Returns True if the Wide_Character designated by Item is categorized as
|
|
56 -- number_decimal, or is in the range 'A' .. 'F' or 'a' .. 'f', otherwise
|
145
|
57 -- returns False.
|
111
|
58
|
|
59 function Is_Alphanumeric (Item : Wide_Character) return Boolean;
|
|
60 pragma Inline (Is_Alphanumeric);
|
|
61 -- Returns True if the Wide_Character designated by Item is categorized as
|
145
|
62 -- letter_uppercase, letter_lowercase, letter_titlecase, letter_modifier,
|
|
63 -- letter_other, number_letter, or number_decimal; otherwise returns False.
|
111
|
64
|
|
65 function Is_Special (Item : Wide_Character) return Boolean;
|
|
66 pragma Inline (Is_Special);
|
|
67 -- Returns True if the Wide_Character designated by Item is categorized
|
|
68 -- as graphic_character, but not categorized as letter_uppercase,
|
|
69 -- letter_lowercase, letter_titlecase, letter_modifier, letter_other,
|
145
|
70 -- number_letter, or number_decimal. Otherwise returns False.
|
111
|
71
|
|
72 function Is_Line_Terminator (Item : Wide_Character) return Boolean;
|
|
73 pragma Inline (Is_Line_Terminator);
|
|
74 -- Returns True if the Wide_Character designated by Item is categorized as
|
|
75 -- separator_line or separator_paragraph, or if Item is a conventional line
|
145
|
76 -- terminator character (CR, LF, VT, or FF). Otherwise returns False.
|
111
|
77
|
|
78 function Is_Mark (Item : Wide_Character) return Boolean;
|
|
79 pragma Inline (Is_Mark);
|
|
80 -- Returns True if the Wide_Character designated by Item is categorized as
|
145
|
81 -- mark_non_spacing or mark_spacing_combining, otherwise returns False.
|
111
|
82
|
|
83 function Is_Other_Format (Item : Wide_Character) return Boolean;
|
|
84 pragma Inline (Is_Other_Format);
|
|
85 -- Returns True if the Wide_Character designated by Item is categorized as
|
145
|
86 -- other_format, otherwise returns False.
|
111
|
87
|
|
88 function Is_Punctuation_Connector (Item : Wide_Character) return Boolean;
|
|
89 pragma Inline (Is_Punctuation_Connector);
|
|
90 -- Returns True if the Wide_Character designated by Item is categorized as
|
145
|
91 -- punctuation_connector, otherwise returns False.
|
111
|
92
|
|
93 function Is_Space (Item : Wide_Character) return Boolean;
|
|
94 pragma Inline (Is_Space);
|
|
95 -- Returns True if the Wide_Character designated by Item is categorized as
|
145
|
96 -- separator_space, otherwise returns False.
|
111
|
97
|
|
98 function Is_Graphic (Item : Wide_Character) return Boolean;
|
|
99 pragma Inline (Is_Graphic);
|
|
100 -- Returns True if the Wide_Character designated by Item is categorized as
|
145
|
101 -- graphic_character, otherwise returns False.
|
111
|
102
|
|
103 function To_Lower (Item : Wide_Character) return Wide_Character;
|
|
104 pragma Inline (To_Lower);
|
|
105 -- Returns the Simple Lowercase Mapping of the Wide_Character designated by
|
|
106 -- Item. If the Simple Lowercase Mapping does not exist for the
|
|
107 -- Wide_Character designated by Item, then the value of Item is returned.
|
|
108
|
|
109 function To_Lower (Item : Wide_String) return Wide_String;
|
|
110 -- Returns the result of applying the To_Lower Wide_Character to
|
|
111 -- Wide_Character conversion to each element of the Wide_String designated
|
|
112 -- by Item. The result is the null Wide_String if the value of the formal
|
|
113 -- parameter is the null Wide_String.
|
|
114
|
|
115 function To_Upper (Item : Wide_Character) return Wide_Character;
|
|
116 pragma Inline (To_Upper);
|
|
117 -- Returns the Simple Uppercase Mapping of the Wide_Character designated by
|
|
118 -- Item. If the Simple Uppercase Mapping does not exist for the
|
|
119 -- Wide_Character designated by Item, then the value of Item is returned.
|
|
120
|
|
121 function To_Upper (Item : Wide_String) return Wide_String;
|
|
122 -- Returns the result of applying the To_Upper 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 end Ada.Wide_Characters.Handling;
|