1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
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 --
9 -- Copyright (C) 1992-2009, 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 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
40 with Ada
.Strings
.Wide_Wide_Maps
;
42 private package Ada
.Strings
.Wide_Wide_Search
is
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;
53 (Source
: Wide_Wide_String
;
54 Pattern
: Wide_Wide_String
;
55 Going
: Direction
:= Forward
;
56 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping_Function
)
60 (Source
: Wide_Wide_String
;
61 Set
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
62 Test
: Membership
:= Inside
;
63 Going
: Direction
:= Forward
) return Natural;
66 (Source
: Wide_Wide_String
;
67 Pattern
: Wide_Wide_String
;
69 Going
: Direction
:= Forward
;
70 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping
:=
71 Wide_Wide_Maps
.Identity
)
75 (Source
: Wide_Wide_String
;
76 Pattern
: Wide_Wide_String
;
78 Going
: Direction
:= Forward
;
79 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping_Function
)
83 (Source
: Wide_Wide_String
;
84 Set
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
86 Test
: Membership
:= Inside
;
87 Going
: Direction
:= Forward
) return Natural;
89 function Index_Non_Blank
90 (Source
: Wide_Wide_String
;
91 Going
: Direction
:= Forward
) return Natural;
93 function Index_Non_Blank
94 (Source
: Wide_Wide_String
;
96 Going
: Direction
:= Forward
) return Natural;
99 (Source
: Wide_Wide_String
;
100 Pattern
: Wide_Wide_String
;
101 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping
:=
102 Wide_Wide_Maps
.Identity
)
106 (Source
: Wide_Wide_String
;
107 Pattern
: Wide_Wide_String
;
108 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping_Function
)
112 (Source
: Wide_Wide_String
;
113 Set
: Wide_Wide_Maps
.Wide_Wide_Character_Set
) return Natural;
116 (Source
: Wide_Wide_String
;
117 Set
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
119 First
: out Positive;
122 end Ada
.Strings
.Wide_Wide_Search
;