DocAda(tm) is a productivity tool of KSCE

Prev | Up | ____ | Back | Forward
About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News

A.4.7 Wide_String Handling

Facilities for handling strings of Wide_Character elements are found in the packages Strings.Wide_Maps, Strings.Wide_Fixed, Strings.Wide_Bounded, Strings.Wide_Unbounded, and Strings.Wide_Maps.Wide_Constants. They provide the same string-handling operations as the corresponding packages for strings of Character elements.

Static Semantics

The package Strings.Wide_Maps has the following declaration.

   
       package Ada.Strings.Wide_Maps is
          pragma Preelaborate(Wide_Maps);

          -- Representation for a set of Wide_Character values:
          type Wide_Character_Set is private;

          Null_Set : constant Wide_Character_Set;

          type Wide_Character_Range is
            record
                Low  : Wide_Character;
                High : Wide_Character;
            end record;
          -- Represents Wide_Character range Low..High

          type Wide_Character_Ranges is array (Positive range <>) of Wide_Character_Range;

          function To_Set    (Ranges : in Wide_Character_Ranges) return Wide_Character_Set;

          function To_Set    (Span   : in Wide_Character_Range)  return Wide_Character_Set;

          function To_Ranges (Set    : in Wide_Character_Set)    return Wide_Character_Ranges;

          function "="   (Left, Right : in Wide_Character_Set) return Boolean;

          function "not" (Right : in Wide_Character_Set)       return Wide_Character_Set;
          function "and" (Left, Right : in Wide_Character_Set) return Wide_Character_Set;
          function "or"  (Left, Right : in Wide_Character_Set) return Wide_Character_Set;
          function "xor" (Left, Right : in Wide_Character_Set) return Wide_Character_Set;
          function "-"   (Left, Right : in Wide_Character_Set) return Wide_Character_Set;

          function Is_In (Element : in Wide_Character;
                          Set     : in Wide_Character_Set)
             return Boolean;

          function Is_Subset (Elements : in Wide_Character_Set;
                              Set      : in Wide_Character_Set)
             return Boolean;

          function "<=" (Left  : in Wide_Character_Set;
                         Right : in Wide_Character_Set)
             return Boolean renames Is_Subset;

          -- Alternative representation for a set of Wide_Character values:
          subtype Wide_Character_Sequence is Wide_String;

          function To_Set (Sequence  : in Wide_Character_Sequence) return Wide_Character_Set;

          function To_Set (Singleton : in Wide_Character) return Wide_Character_Set;

          function To_Sequence (Set  : in Wide_Character_Set) return Wide_Character_Sequence;

          -- Representation for a Wide_Character to Wide_Character mapping:
          type Wide_Character_Mapping is private;

          function Value (Map     : in Wide_Character_Mapping;
                          Element : in Wide_Character)
             return Wide_Character;

          Identity : constant Wide_Character_Mapping;

          function To_Mapping (From, To : in Wide_Character_Sequence)
             return Wide_Character_Mapping;

          function To_Domain (Map : in Wide_Character_Mapping)
             return Wide_Character_Sequence;

          function To_Range  (Map : in Wide_Character_Mapping)
             return Wide_Character_Sequence;

          type Wide_Character_Mapping_Function is
             access function (From : in Wide_Character) return Wide_Character;

       private
          ... -- not specified by the language
       end Ada.Strings.Wide_Maps;

The context clause for each of the packages Strings.Wide_Fixed, Strings.Wide_Bounded, and Strings.Wide_Unbounded identifies Strings.Wide_Maps instead of Strings.Maps.

For each of the packages Strings.Fixed, Strings.Bounded, Strings.Unbounded, and Strings.Maps.Constants the corresponding wide string package has the same contents except that

The following additional declaration is present in Strings.Wide_Maps.Wide_Constants:

    
       Character_Set : constant Wide_Maps.Wide_Character_Set;
       --Contains each Wide_Character value WC such that Characters.Is_Character(WC) is True

About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News
Prev | Up | ____ | Back | Forward


Copyright © 1994-1997 by Kempe Software Capital Enterprises. All Rights Reserved. For comments on this DocAda(tm) hypertext document, please write to KSCE, at docada@ksce.com