File : a-stzsea.ads


   1 ------------------------------------------------------------------------------
   2 --                                                                          --
   3 --                         GNAT RUN-TIME COMPONENTS                         --
   4 --                                                                          --
   5 --         A D A . S T R I N G S . W I D E _ W I D E _ S E A R C H          --
   6 --                                                                          --
   7 --                                 S p e c                                  --
   8 --                                                                          --
   9 --          Copyright (C) 1992-2010, Free Software Foundation, Inc.         --
  10 --                                                                          --
  11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  12 -- terms of the  GNU General Public License as published  by the Free Soft- --
  13 -- ware  Foundation;  either version 3,  or (at your option) any later ver- --
  14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  16 -- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
  17 --                                                                          --
  18 --                                                                          --
  19 --                                                                          --
  20 --                                                                          --
  21 --                                                                          --
  22 -- You should have received a copy of the GNU General Public License and    --
  23 -- a copy of the GCC Runtime Library Exception along with this program;     --
  24 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
  25 -- <http://www.gnu.org/licenses/>.                                          --
  26 --                                                                          --
  27 -- GNAT was originally developed  by the GNAT team at  New York University. --
  28 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
  29 --                                                                          --
  30 ------------------------------------------------------------------------------
  31 
  32 --  This package contains search functions from Ada.Strings.Wide_Wide_Fixed.
  33 --  They are separated because Ada.Strings.Wide_Wide_Bounded shares these
  34 --  search functions with Ada.Strings.Wide_Wide_Unbounded, and we don't want
  35 --  to drag other irrelevant stuff from Ada.Strings.Wide_Wide_Fixed when using
  36 --  the other two packages. We make this a private package, since user
  37 --  programs should access these subprograms via one of the standard string
  38 --  packages.
  39 
  40 with Ada.Strings.Wide_Wide_Maps;
  41 
  42 private package Ada.Strings.Wide_Wide_Search is
  43    pragma Preelaborate;
  44 
  45    function Index
  46      (Source  : Wide_Wide_String;
  47       Pattern : Wide_Wide_String;
  48       Going   : Direction := Forward;
  49       Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
  50                   Wide_Wide_Maps.Identity) return Natural;
  51 
  52    function Index
  53      (Source  : Wide_Wide_String;
  54       Pattern : Wide_Wide_String;
  55       Going   : Direction := Forward;
  56       Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
  57       return Natural;
  58 
  59    function Index
  60      (Source : Wide_Wide_String;
  61       Set    : Wide_Wide_Maps.Wide_Wide_Character_Set;
  62       Test   : Membership := Inside;
  63       Going  : Direction  := Forward) return Natural;
  64 
  65    function Index
  66      (Source  : Wide_Wide_String;
  67       Pattern : Wide_Wide_String;
  68       From    : Positive;
  69       Going   : Direction := Forward;
  70       Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
  71                   Wide_Wide_Maps.Identity)
  72       return Natural;
  73 
  74    function Index
  75      (Source  : Wide_Wide_String;
  76       Pattern : Wide_Wide_String;
  77       From    : Positive;
  78       Going   : Direction := Forward;
  79       Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
  80       return Natural;
  81 
  82    function Index
  83      (Source  : Wide_Wide_String;
  84       Set     : Wide_Wide_Maps.Wide_Wide_Character_Set;
  85       From    : Positive;
  86       Test    : Membership := Inside;
  87       Going   : Direction := Forward) return Natural;
  88 
  89    function Index_Non_Blank
  90      (Source : Wide_Wide_String;
  91       Going  : Direction := Forward) return Natural;
  92 
  93    function Index_Non_Blank
  94      (Source : Wide_Wide_String;
  95       From   : Positive;
  96       Going  : Direction := Forward) return Natural;
  97 
  98    function Count
  99      (Source  : Wide_Wide_String;
 100       Pattern : Wide_Wide_String;
 101       Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
 102                   Wide_Wide_Maps.Identity)
 103       return Natural;
 104 
 105    function Count
 106      (Source  : Wide_Wide_String;
 107       Pattern : Wide_Wide_String;
 108       Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
 109       return Natural;
 110 
 111    function Count
 112      (Source : Wide_Wide_String;
 113       Set    : Wide_Wide_Maps.Wide_Wide_Character_Set) return Natural;
 114 
 115    procedure Find_Token
 116      (Source : Wide_Wide_String;
 117       Set    : Wide_Wide_Maps.Wide_Wide_Character_Set;
 118       From   : Positive;
 119       Test   : Membership;
 120       First  : out Positive;
 121       Last   : out Natural);
 122 
 123    procedure Find_Token
 124      (Source : Wide_Wide_String;
 125       Set    : Wide_Wide_Maps.Wide_Wide_Character_Set;
 126       Test   : Membership;
 127       First  : out Positive;
 128       Last   : out Natural);
 129 
 130 end Ada.Strings.Wide_Wide_Search;