]>
Commit | Line | Data |
---|---|---|
d23b8f57 RK |
1 | ------------------------------------------------------------------------------ |
2 | -- -- | |
3 | -- GNAT RUN-TIME COMPONENTS -- | |
4 | -- -- | |
5 | -- A D A . S T R I N G S . W I D E _ S E A R C H -- | |
6 | -- -- | |
7 | -- S p e c -- | |
8 | -- -- | |
4b490c1e | 9 | -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- |
d23b8f57 RK |
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- -- | |
748086b7 | 13 | -- ware Foundation; either version 3, or (at your option) any later ver- -- |
d23b8f57 RK |
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 -- | |
748086b7 JJ |
16 | -- or FITNESS FOR A PARTICULAR PURPOSE. -- |
17 | -- -- | |
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. -- | |
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/>. -- | |
d23b8f57 RK |
26 | -- -- |
27 | -- GNAT was originally developed by the GNAT team at New York University. -- | |
71ff80dc | 28 | -- Extensive contributions were provided by Ada Core Technologies Inc. -- |
d23b8f57 RK |
29 | -- -- |
30 | ------------------------------------------------------------------------------ | |
31 | ||
32 | -- This package contains the search functions from Ada.Strings.Wide_Fixed. | |
33 | -- They are separated out because they are shared by Ada.Strings.Wide_Bounded | |
3815f967 AC |
34 | -- and Ada.Strings.Wide_Unbounded, and we don't want to drag in other |
35 | -- irrelevant stuff from Ada.Strings.Wide_Fixed when using the other two | |
36 | -- packages. We make this a private package, since user programs should | |
37 | -- access these subprograms via one of the standard string packages. | |
d23b8f57 RK |
38 | |
39 | with Ada.Strings.Wide_Maps; | |
40 | ||
41 | private package Ada.Strings.Wide_Search is | |
009186e0 | 42 | pragma Preelaborate; |
d23b8f57 | 43 | |
4e45e7a9 RD |
44 | function Index |
45 | (Source : Wide_String; | |
46 | Pattern : Wide_String; | |
47 | Going : Direction := Forward; | |
48 | Mapping : Wide_Maps.Wide_Character_Mapping := | |
49 | Wide_Maps.Identity) return Natural; | |
d23b8f57 | 50 | |
4e45e7a9 RD |
51 | function Index |
52 | (Source : Wide_String; | |
53 | Pattern : Wide_String; | |
54 | Going : Direction := Forward; | |
55 | Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural; | |
d23b8f57 | 56 | |
4e45e7a9 RD |
57 | function Index |
58 | (Source : Wide_String; | |
59 | Set : Wide_Maps.Wide_Character_Set; | |
60 | Test : Membership := Inside; | |
61 | Going : Direction := Forward) return Natural; | |
d23b8f57 | 62 | |
4e45e7a9 RD |
63 | function Index |
64 | (Source : Wide_String; | |
65 | Pattern : Wide_String; | |
66 | From : Positive; | |
67 | Going : Direction := Forward; | |
68 | Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) | |
d23b8f57 RK |
69 | return Natural; |
70 | ||
4e45e7a9 RD |
71 | function Index |
72 | (Source : Wide_String; | |
73 | Pattern : Wide_String; | |
74 | From : Positive; | |
75 | Going : Direction := Forward; | |
76 | Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural; | |
d23b8f57 | 77 | |
4e45e7a9 RD |
78 | function Index |
79 | (Source : Wide_String; | |
80 | Set : Wide_Maps.Wide_Character_Set; | |
81 | From : Positive; | |
82 | Test : Membership := Inside; | |
83 | Going : Direction := Forward) return Natural; | |
84 | ||
85 | function Index_Non_Blank | |
86 | (Source : Wide_String; | |
87 | Going : Direction := Forward) return Natural; | |
d23b8f57 | 88 | |
4e45e7a9 RD |
89 | function Index_Non_Blank |
90 | (Source : Wide_String; | |
91 | From : Positive; | |
92 | Going : Direction := Forward) return Natural; | |
93 | ||
94 | function Count | |
95 | (Source : Wide_String; | |
96 | Pattern : Wide_String; | |
97 | Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) | |
d23b8f57 RK |
98 | return Natural; |
99 | ||
4e45e7a9 RD |
100 | function Count |
101 | (Source : Wide_String; | |
102 | Pattern : Wide_String; | |
103 | Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural; | |
104 | ||
105 | function Count | |
106 | (Source : Wide_String; | |
107 | Set : Wide_Maps.Wide_Character_Set) return Natural; | |
d23b8f57 | 108 | |
af31bffb AC |
109 | procedure Find_Token |
110 | (Source : Wide_String; | |
111 | Set : Wide_Maps.Wide_Character_Set; | |
112 | From : Positive; | |
113 | Test : Membership; | |
114 | First : out Positive; | |
115 | Last : out Natural); | |
116 | pragma Ada_2012 (Find_Token); | |
117 | ||
4e45e7a9 RD |
118 | procedure Find_Token |
119 | (Source : Wide_String; | |
120 | Set : Wide_Maps.Wide_Character_Set; | |
121 | Test : Membership; | |
122 | First : out Positive; | |
123 | Last : out Natural); | |
d23b8f57 RK |
124 | |
125 | end Ada.Strings.Wide_Search; |