1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- A D A . C H A R A C T E R S . H A N D L I N G --
9 -- Copyright (C) 1992-1997 Free Software Foundation, Inc. --
11 -- This specification is derived from the Ada Reference Manual for use with --
12 -- GNAT. The copyright notice above, and the license provisions that follow --
13 -- apply solely to the contents of the part following the private keyword. --
15 -- GNAT is free software; you can redistribute it and/or modify it under --
16 -- terms of the GNU General Public License as published by the Free Soft- --
17 -- ware Foundation; either version 2, or (at your option) any later ver- --
18 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
19 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
20 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
21 -- for more details. You should have received a copy of the GNU General --
22 -- Public License distributed with GNAT; see file COPYING. If not, write --
23 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
24 -- MA 02111-1307, USA. --
26 -- As a special exception, if other files instantiate generics from this --
27 -- unit, or you link this unit with other files to produce an executable, --
28 -- this unit does not by itself cause the resulting executable to be --
29 -- covered by the GNU General Public License. This exception does not --
30 -- however invalidate any other reasons why the executable file might be --
31 -- covered by the GNU Public License. --
33 -- GNAT was originally developed by the GNAT team at New York University. --
34 -- Extensive contributions were provided by Ada Core Technologies Inc. --
36 ------------------------------------------------------------------------------
39 package Ada
.Characters
.Handling
is
40 pragma Preelaborate
(Handling
);
42 ----------------------------------------
43 -- Character Classification Functions --
44 ----------------------------------------
46 function Is_Control
(Item
: in Character) return Boolean;
47 function Is_Graphic
(Item
: in Character) return Boolean;
48 function Is_Letter
(Item
: in Character) return Boolean;
49 function Is_Lower
(Item
: in Character) return Boolean;
50 function Is_Upper
(Item
: in Character) return Boolean;
51 function Is_Basic
(Item
: in Character) return Boolean;
52 function Is_Digit
(Item
: in Character) return Boolean;
53 function Is_Decimal_Digit
(Item
: in Character) return Boolean
55 function Is_Hexadecimal_Digit
(Item
: in Character) return Boolean;
56 function Is_Alphanumeric
(Item
: in Character) return Boolean;
57 function Is_Special
(Item
: in Character) return Boolean;
59 ---------------------------------------------------
60 -- Conversion Functions for Character and String --
61 ---------------------------------------------------
63 function To_Lower
(Item
: in Character) return Character;
64 function To_Upper
(Item
: in Character) return Character;
65 function To_Basic
(Item
: in Character) return Character;
67 function To_Lower
(Item
: in String) return String;
68 function To_Upper
(Item
: in String) return String;
69 function To_Basic
(Item
: in String) return String;
71 ----------------------------------------------------------------------
72 -- Classifications of and Conversions Between Character and ISO 646 --
73 ----------------------------------------------------------------------
76 Character range Character'Val (0) .. Character'Val (127);
78 function Is_ISO_646
(Item
: in Character) return Boolean;
79 function Is_ISO_646
(Item
: in String) return Boolean;
83 Substitute
: in ISO_646
:= ' ')
88 Substitute
: in ISO_646
:= ' ')
91 ------------------------------------------------------
92 -- Classifications of Wide_Character and Characters --
93 ------------------------------------------------------
95 function Is_Character
(Item
: in Wide_Character) return Boolean;
96 function Is_String
(Item
: in Wide_String) return Boolean;
98 ------------------------------------------------------
99 -- Conversions between Wide_Character and Character --
100 ------------------------------------------------------
102 function To_Character
103 (Item
: in Wide_Character;
104 Substitute
: in Character := ' ')
108 (Item
: in Wide_String;
109 Substitute
: in Character := ' ')
112 function To_Wide_Character
(Item
: in Character) return Wide_Character;
113 function To_Wide_String
(Item
: in String) return Wide_String;
116 pragma Inline
(Is_Control
);
117 pragma Inline
(Is_Graphic
);
118 pragma Inline
(Is_Letter
);
119 pragma Inline
(Is_Lower
);
120 pragma Inline
(Is_Upper
);
121 pragma Inline
(Is_Basic
);
122 pragma Inline
(Is_Digit
);
123 pragma Inline
(Is_Hexadecimal_Digit
);
124 pragma Inline
(Is_Alphanumeric
);
125 pragma Inline
(Is_Special
);
126 pragma Inline
(To_Lower
);
127 pragma Inline
(To_Upper
);
128 pragma Inline
(To_Basic
);
129 pragma Inline
(Is_ISO_646
);
130 pragma Inline
(Is_Character
);
131 pragma Inline
(To_Character
);
132 pragma Inline
(To_Wide_Character
);
134 end Ada
.Characters
.Handling
;