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 --
10 -- Copyright (C) 1992-1997 Free Software Foundation, Inc. --
12 -- This specification is derived from the Ada Reference Manual for use with --
13 -- GNAT. The copyright notice above, and the license provisions that follow --
14 -- apply solely to the contents of the part following the private keyword. --
16 -- GNAT is free software; you can redistribute it and/or modify it under --
17 -- terms of the GNU General Public License as published by the Free Soft- --
18 -- ware Foundation; either version 2, or (at your option) any later ver- --
19 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
20 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
21 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
22 -- for more details. You should have received a copy of the GNU General --
23 -- Public License distributed with GNAT; see file COPYING. If not, write --
24 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
25 -- MA 02111-1307, USA. --
27 -- As a special exception, if other files instantiate generics from this --
28 -- unit, or you link this unit with other files to produce an executable, --
29 -- this unit does not by itself cause the resulting executable to be --
30 -- covered by the GNU General Public License. This exception does not --
31 -- however invalidate any other reasons why the executable file might be --
32 -- covered by the GNU Public License. --
34 -- GNAT was originally developed by the GNAT team at New York University. --
35 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
37 ------------------------------------------------------------------------------
40 package Ada.Characters.Handling is
41 pragma Preelaborate (Handling);
43 ----------------------------------------
44 -- Character Classification Functions --
45 ----------------------------------------
47 function Is_Control (Item : in Character) return Boolean;
48 function Is_Graphic (Item : in Character) return Boolean;
49 function Is_Letter (Item : in Character) return Boolean;
50 function Is_Lower (Item : in Character) return Boolean;
51 function Is_Upper (Item : in Character) return Boolean;
52 function Is_Basic (Item : in Character) return Boolean;
53 function Is_Digit (Item : in Character) return Boolean;
54 function Is_Decimal_Digit (Item : in Character) return Boolean
56 function Is_Hexadecimal_Digit (Item : in Character) return Boolean;
57 function Is_Alphanumeric (Item : in Character) return Boolean;
58 function Is_Special (Item : in Character) return Boolean;
60 ---------------------------------------------------
61 -- Conversion Functions for Character and String --
62 ---------------------------------------------------
64 function To_Lower (Item : in Character) return Character;
65 function To_Upper (Item : in Character) return Character;
66 function To_Basic (Item : in Character) return Character;
68 function To_Lower (Item : in String) return String;
69 function To_Upper (Item : in String) return String;
70 function To_Basic (Item : in String) return String;
72 ----------------------------------------------------------------------
73 -- Classifications of and Conversions Between Character and ISO 646 --
74 ----------------------------------------------------------------------
77 Character range Character'Val (0) .. Character'Val (127);
79 function Is_ISO_646 (Item : in Character) return Boolean;
80 function Is_ISO_646 (Item : in String) return Boolean;
84 Substitute : in ISO_646 := ' ')
89 Substitute : in ISO_646 := ' ')
92 ------------------------------------------------------
93 -- Classifications of Wide_Character and Characters --
94 ------------------------------------------------------
96 function Is_Character (Item : in Wide_Character) return Boolean;
97 function Is_String (Item : in Wide_String) return Boolean;
99 ------------------------------------------------------
100 -- Conversions between Wide_Character and Character --
101 ------------------------------------------------------
103 function To_Character
104 (Item : in Wide_Character;
105 Substitute : in Character := ' ')
109 (Item : in Wide_String;
110 Substitute : in Character := ' ')
113 function To_Wide_Character (Item : in Character) return Wide_Character;
114 function To_Wide_String (Item : in String) return Wide_String;
117 pragma Inline (Is_Control);
118 pragma Inline (Is_Graphic);
119 pragma Inline (Is_Letter);
120 pragma Inline (Is_Lower);
121 pragma Inline (Is_Upper);
122 pragma Inline (Is_Basic);
123 pragma Inline (Is_Digit);
124 pragma Inline (Is_Hexadecimal_Digit);
125 pragma Inline (Is_Alphanumeric);
126 pragma Inline (Is_Special);
127 pragma Inline (To_Lower);
128 pragma Inline (To_Upper);
129 pragma Inline (To_Basic);
130 pragma Inline (Is_ISO_646);
131 pragma Inline (Is_Character);
132 pragma Inline (To_Character);
133 pragma Inline (To_Wide_Character);
135 end Ada.Characters.Handling;