]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/a-strsea.ads
Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
[thirdparty/gcc.git] / gcc / ada / a-strsea.ads
CommitLineData
d23b8f57
RK
1------------------------------------------------------------------------------
2-- --
3-- GNAT RUN-TIME COMPONENTS --
4-- --
5-- A D A . S T R I N G S . S E A R C H --
6-- --
7-- S p e c --
8-- --
748086b7 9-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
d23b8f57 10-- --
d23b8f57
RK
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.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.
38
39with Ada.Strings.Maps;
40
41private package Ada.Strings.Search is
009186e0 42 pragma Preelaborate;
d23b8f57
RK
43
44 function Index
8a6a52dc
AC
45 (Source : String;
46 Pattern : String;
47 Going : Direction := Forward;
48 Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
d23b8f57
RK
49
50 function Index
8a6a52dc
AC
51 (Source : String;
52 Pattern : String;
53 Going : Direction := Forward;
54 Mapping : Maps.Character_Mapping_Function) return Natural;
d23b8f57
RK
55
56 function Index
8a6a52dc
AC
57 (Source : String;
58 Set : Maps.Character_Set;
59 Test : Membership := Inside;
60 Going : Direction := Forward) return Natural;
d23b8f57 61
4e45e7a9
RD
62 function Index
63 (Source : String;
64 Pattern : String;
65 From : Positive;
66 Going : Direction := Forward;
67 Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
68
69 function Index
70 (Source : String;
71 Pattern : String;
72 From : Positive;
73 Going : Direction := Forward;
74 Mapping : Maps.Character_Mapping_Function) return Natural;
75
76 function Index
77 (Source : String;
78 Set : Maps.Character_Set;
79 From : Positive;
80 Test : Membership := Inside;
81 Going : Direction := Forward) return Natural;
82
83 function Index_Non_Blank
84 (Source : String;
85 Going : Direction := Forward) return Natural;
86
d23b8f57 87 function Index_Non_Blank
8a6a52dc 88 (Source : String;
4e45e7a9 89 From : Positive;
8a6a52dc 90 Going : Direction := Forward) return Natural;
d23b8f57
RK
91
92 function Count
8a6a52dc
AC
93 (Source : String;
94 Pattern : String;
95 Mapping : Maps.Character_Mapping := Maps.Identity) return Natural;
d23b8f57
RK
96
97 function Count
8a6a52dc
AC
98 (Source : String;
99 Pattern : String;
100 Mapping : Maps.Character_Mapping_Function) return Natural;
d23b8f57
RK
101
102 function Count
8a6a52dc
AC
103 (Source : String;
104 Set : Maps.Character_Set) return Natural;
d23b8f57
RK
105
106 procedure Find_Token
8a6a52dc
AC
107 (Source : String;
108 Set : Maps.Character_Set;
109 Test : Membership;
d23b8f57
RK
110 First : out Positive;
111 Last : out Natural);
112
113end Ada.Strings.Search;