2014-10-31 Hristian Kirtchev <kirtchev@adacore.com>
[official-gcc.git] / gcc / ada / a-wichha.ads
blob583308ec6a0c3fdbf0b4527d41bb8db7d8a00e52
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 ------------------------------------------------------------------------------
16 package Ada.Wide_Characters.Handling is
17 pragma Pure;
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".
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.
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.
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.
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.
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
49 -- number_decimal, otherwise returns false.
51 function Is_Decimal_Digit (Item : Wide_Character) return Boolean
52 renames Is_Digit;
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
57 -- returns false.
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
62 -- number_decimal, or is in the range 'A' .. 'F' or 'a' .. 'f', otherwise
63 -- returns false.
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,
70 -- number_letter, or number_decimal. Otherwise returns false.
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
76 -- terminator character (CR, LF, VT, or FF). Otherwise returns false.
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
81 -- mark_non_spacing or mark_spacing_combining, otherwise returns false.
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
86 -- other_format, otherwise returns false.
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
91 -- punctuation_connector, otherwise returns false.
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
96 -- separator_space, otherwise returns false.
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
101 -- graphic_character, otherwise returns false.
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.
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.
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.
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.
127 end Ada.Wide_Characters.Handling;