1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- A D A . S T R I N G S . S E A R C H --
9 -- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
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. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
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/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 -- This package contains the search functions from Ada.Strings.Fixed. They
33 -- are separated out because they are shared by Ada.Strings.Bounded and
34 -- Ada.Strings.Unbounded, and we don't want to drag other irrelevant stuff
35 -- from Ada.Strings.Fixed when using the other two packages. We make this
36 -- a private package, since user programs should access these subprograms
37 -- via one of the standard string packages.
39 with Ada.Strings.Maps;
41 private package Ada.Strings.Search is
47 Going : Direction := Forward;
48 Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
53 Going : Direction := Forward;
54 Mapping : Maps.Character_Mapping_Function) return Natural;
58 Set : Maps.Character_Set;
59 Test : Membership := Inside;
60 Going : Direction := Forward) return Natural;
66 Going : Direction := Forward;
67 Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
73 Going : Direction := Forward;
74 Mapping : Maps.Character_Mapping_Function) return Natural;
78 Set : Maps.Character_Set;
80 Test : Membership := Inside;
81 Going : Direction := Forward) return Natural;
83 function Index_Non_Blank
85 Going : Direction := Forward) return Natural;
87 function Index_Non_Blank
90 Going : Direction := Forward) return Natural;
95 Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
100 Mapping : Maps.Character_Mapping_Function) return Natural;
104 Set : Maps.Character_Set) return Natural;
108 Set : Maps.Character_Set;
111 First : out Positive;
116 Set : Maps.Character_Set;
118 First : out Positive;
121 end Ada.Strings.Search;