Annotated Ada Reference Manual (Ada 202y Draft 1)Legal Information
Contents   Index   References   Search   Previous   Next 

A.3.4 The Package Characters.Conversions

Static Semantics

1/2
{AI95-00395-01} The library package Characters.Conversions has the following declaration:
2/5
{AI12-0414-1} package Ada.Characters.Conversions
   with Pure is
3/2
   function Is_Character (Item : in Wide_Character)      return Boolean;
   function Is_String    (Item : in Wide_String)         return Boolean;
   function Is_Character (Item : in Wide_Wide_Character) return Boolean;
   function Is_String    (Item : in Wide_Wide_String)    return Boolean;
   function Is_Wide_Character (Item : in Wide_Wide_Character)
      return Boolean;
   function Is_Wide_String    (Item : in Wide_Wide_String)
      return Boolean;
4/2
   function To_Wide_Character (Item : in Character) return Wide_Character;
   function To_Wide_String    (Item : in String)    return Wide_String;
   function To_Wide_Wide_Character (Item : in Character)
      return Wide_Wide_Character;
   function To_Wide_Wide_String    (Item : in String)
      return Wide_Wide_String;
   function To_Wide_Wide_Character (Item : in Wide_Character)
      return Wide_Wide_Character;
   function To_Wide_Wide_String    (Item : in Wide_String)
      return Wide_Wide_String;
5/2
   function To_Character (Item       : in Wide_Character;
                         Substitute : in Character := ' ')
      return Character;
   function To_String    (Item       : in Wide_String;
                          Substitute : in Character := ' ')
      return String;
   function To_Character (Item :       in Wide_Wide_Character;
                          Substitute : in Character := ' ')
      return Character;
   function To_String    (Item :       in Wide_Wide_String;
                          Substitute : in Character := ' ')
      return String;
   function To_Wide_Character (Item :       in Wide_Wide_Character;
                               Substitute : in Wide_Character := ' ')
      return Wide_Character;
   function To_Wide_String    (Item :       in Wide_Wide_String;
                               Substitute : in Wide_Character := ' ')
      return Wide_String;
6/2
end Ada.Characters.Conversions;
7/2
{AI95-00395-01} The functions in package Characters.Conversions test Wide_Wide_Character or Wide_Character values for membership in Wide_Character or Character, or convert between corresponding characters of Wide_Wide_Character, Wide_Character, and Character.
8/2
function Is_Character (Item : in Wide_Character) return Boolean;
9/2
{AI95-00395-01} Returns True if Wide_Character'Pos(Item) <= Character'Pos(Character'Last).
10/2
function Is_Character (Item : in Wide_Wide_Character) return Boolean;
11/2
{AI95-00395-01} Returns True if Wide_Wide_Character'Pos(Item) <= Character'Pos(Character'Last).
12/2
function Is_Wide_Character (Item : in Wide_Wide_Character) return Boolean;
13/2
{AI95-00395-01} Returns True if Wide_Wide_Character'Pos(Item) <= Wide_Character'Pos(Wide_Character'Last).
14/2
function Is_String (Item : in Wide_String)      return Boolean;
function Is_String (Item : in Wide_Wide_String) return Boolean;
15/2
{AI95-00395-01} Returns True if Is_Character(Item(I)) is True for each I in Item'Range.
16/2
function Is_Wide_String (Item : in Wide_Wide_String) return Boolean;
17/2
{AI95-00395-01} Returns True if Is_Wide_Character(Item(I)) is True for each I in Item'Range.
18/2
function To_Character (Item :       in Wide_Character;
                       Substitute : in Character := ' ') return Character;
function To_Character (Item :       in Wide_Wide_Character;
                       Substitute : in Character := ' ') return Character;
19/2
{AI95-00395-01} Returns the Character corresponding to Item if Is_Character(Item), and returns the Substitute Character otherwise.
20/2
function To_Wide_Character (Item : in Character) return Wide_Character;
21/2
{AI95-00395-01} Returns the Wide_Character X such that Character'Pos(Item) = Wide_Character'Pos (X).
22/2
function To_Wide_Character (Item :       in Wide_Wide_Character;
                            Substitute : in Wide_Character := ' ')
   return Wide_Character;
23/2
{AI95-00395-01} Returns the Wide_Character corresponding to Item if Is_Wide_Character(Item), and returns the Substitute Wide_Character otherwise.
24/2
function To_Wide_Wide_Character (Item : in Character)
   return Wide_Wide_Character;
25/2
{AI95-00395-01} Returns the Wide_Wide_Character X such that Character'Pos(Item) = Wide_Wide_Character'Pos (X).
26/2
function To_Wide_Wide_Character (Item : in Wide_Character)
   return Wide_Wide_Character;
27/2
{AI95-00395-01} Returns the Wide_Wide_Character X such that Wide_Character'Pos(Item) = Wide_Wide_Character'Pos (X).
28/2
function To_String (Item :       in Wide_String;
                    Substitute : in Character := ' ') return String;
function To_String (Item :       in Wide_Wide_String;
                    Substitute : in Character := ' ') return String;
29/2
{AI95-00395-01} Returns the String whose range is 1..Item'Length and each of whose elements is given by To_Character of the corresponding element in Item.
30/2
function To_Wide_String (Item : in String) return Wide_String;
31/2
{AI95-00395-01} Returns the Wide_String whose range is 1..Item'Length and each of whose elements is given by To_Wide_Character of the corresponding element in Item.
32/2
function To_Wide_String (Item :       in Wide_Wide_String;
                         Substitute : in Wide_Character := ' ')
   return Wide_String;
33/2
{AI95-00395-01} Returns the Wide_String whose range is 1..Item'Length and each of whose elements is given by To_Wide_Character of the corresponding element in Item with the given Substitute Wide_Character.
34/2
function To_Wide_Wide_String (Item : in String) return Wide_Wide_String;
function To_Wide_Wide_String (Item : in Wide_String)
   return Wide_Wide_String;
35/2
{AI95-00395-01} Returns the Wide_Wide_String whose range is 1..Item'Length and each of whose elements is given by To_Wide_Wide_Character of the corresponding element in Item.

Extensions to Ada 95

35.a/2
{AI95-00395-01} The package Characters.Conversions is new, replacing functions previously found in Characters.Handling. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe