A.3.4 The Package Characters.Conversions
Static Semantics
The library package
Characters.Conversions has the following declaration:
package Ada.Characters.Conversions
with Pure
is
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;
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;
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;
end Ada.Characters.Conversions;
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.
function Is_Character (Item : in Wide_Character) return Boolean;
Returns True if
Wide_Character'Pos(Item) <= Character'Pos(Character'Last).
function Is_Character (Item : in Wide_Wide_Character) return Boolean;
Returns True if
Wide_Wide_Character'Pos(Item) <= Character'Pos(Character'Last).
function Is_Wide_Character (Item : in Wide_Wide_Character) return Boolean;
Returns True if
Wide_Wide_Character'Pos(Item) <= Wide_Character'Pos(Wide_Character'Last).
function Is_String (Item : in Wide_String) return Boolean;
function Is_String (Item : in Wide_Wide_String) return Boolean;
Returns True if
Is_Character(Item(I)) is True for each I in Item'Range.
function Is_Wide_String (Item : in Wide_Wide_String) return Boolean;
Returns True if
Is_Wide_Character(Item(I)) is True for each I in Item'Range.
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;
Returns the Character
corresponding to Item if Is_Character(Item), and returns the Substitute
Character otherwise.
function To_Wide_Character (Item : in Character) return Wide_Character;
Returns the Wide_Character
X such that Character'Pos(Item) = Wide_Character'Pos (X).
function To_Wide_Character (Item : in Wide_Wide_Character;
Substitute : in Wide_Character := ' ')
return Wide_Character;
Returns the Wide_Character
corresponding to Item if Is_Wide_Character(Item), and returns the Substitute
Wide_Character otherwise.
function To_Wide_Wide_Character (Item : in Character)
return Wide_Wide_Character;
Returns the Wide_Wide_Character
X such that Character'Pos(Item) = Wide_Wide_Character'Pos (X).
function To_Wide_Wide_Character (Item : in Wide_Character)
return Wide_Wide_Character;
Returns the Wide_Wide_Character
X such that Wide_Character'Pos(Item) = Wide_Wide_Character'Pos (X).
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;
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.
function To_Wide_String (Item : in String) return Wide_String;
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.
function To_Wide_String (Item : in Wide_Wide_String;
Substitute : in Wide_Character := ' ')
return Wide_String;
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.
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;
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.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe