annotate gcc/ada/libgnat/a-stzbou.ads @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT RUN-TIME COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- A D A . S T R I N G S . W I D E _ W I D E _ B O U N D E D --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- This specification is derived from the Ada Reference Manual for use with --
kono
parents:
diff changeset
12 -- GNAT. The copyright notice above, and the license provisions that follow --
kono
parents:
diff changeset
13 -- apply solely to the contents of the part following the private keyword. --
kono
parents:
diff changeset
14 -- --
kono
parents:
diff changeset
15 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
16 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
17 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
18 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
19 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
20 -- or FITNESS FOR A PARTICULAR PURPOSE. --
kono
parents:
diff changeset
21 -- --
kono
parents:
diff changeset
22 -- As a special exception under Section 7 of GPL version 3, you are granted --
kono
parents:
diff changeset
23 -- additional permissions described in the GCC Runtime Library Exception, --
kono
parents:
diff changeset
24 -- version 3.1, as published by the Free Software Foundation. --
kono
parents:
diff changeset
25 -- --
kono
parents:
diff changeset
26 -- You should have received a copy of the GNU General Public License and --
kono
parents:
diff changeset
27 -- a copy of the GCC Runtime Library Exception along with this program; --
kono
parents:
diff changeset
28 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
kono
parents:
diff changeset
29 -- <http://www.gnu.org/licenses/>. --
kono
parents:
diff changeset
30 -- --
kono
parents:
diff changeset
31 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
32 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
33 -- --
kono
parents:
diff changeset
34 ------------------------------------------------------------------------------
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 with Ada.Strings.Wide_Wide_Maps;
kono
parents:
diff changeset
37 with Ada.Strings.Wide_Wide_Superbounded;
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 package Ada.Strings.Wide_Wide_Bounded is
kono
parents:
diff changeset
40 pragma Preelaborate;
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 generic
kono
parents:
diff changeset
43 Max : Positive;
kono
parents:
diff changeset
44 -- Maximum length of a Bounded_Wide_Wide_String
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 package Generic_Bounded_Length is
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 Max_Length : constant Positive := Max;
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 type Bounded_Wide_Wide_String is private;
kono
parents:
diff changeset
51 pragma Preelaborable_Initialization (Bounded_Wide_Wide_String);
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 Null_Bounded_Wide_Wide_String : constant Bounded_Wide_Wide_String;
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 subtype Length_Range is Natural range 0 .. Max_Length;
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 function Length (Source : Bounded_Wide_Wide_String) return Length_Range;
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 --------------------------------------------------------
kono
parents:
diff changeset
60 -- Conversion, Concatenation, and Selection Functions --
kono
parents:
diff changeset
61 --------------------------------------------------------
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 function To_Bounded_Wide_Wide_String
kono
parents:
diff changeset
64 (Source : Wide_Wide_String;
kono
parents:
diff changeset
65 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 function To_Wide_Wide_String
kono
parents:
diff changeset
68 (Source : Bounded_Wide_Wide_String) return Wide_Wide_String;
kono
parents:
diff changeset
69
kono
parents:
diff changeset
70 procedure Set_Bounded_Wide_Wide_String
kono
parents:
diff changeset
71 (Target : out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
72 Source : Wide_Wide_String;
kono
parents:
diff changeset
73 Drop : Truncation := Error);
kono
parents:
diff changeset
74 pragma Ada_05 (Set_Bounded_Wide_Wide_String);
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 function Append
kono
parents:
diff changeset
77 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
78 Right : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
79 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
80
kono
parents:
diff changeset
81 function Append
kono
parents:
diff changeset
82 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
83 Right : Wide_Wide_String;
kono
parents:
diff changeset
84 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
85
kono
parents:
diff changeset
86 function Append
kono
parents:
diff changeset
87 (Left : Wide_Wide_String;
kono
parents:
diff changeset
88 Right : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
89 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
90
kono
parents:
diff changeset
91 function Append
kono
parents:
diff changeset
92 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
93 Right : Wide_Wide_Character;
kono
parents:
diff changeset
94 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
95
kono
parents:
diff changeset
96 function Append
kono
parents:
diff changeset
97 (Left : Wide_Wide_Character;
kono
parents:
diff changeset
98 Right : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
99 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
100
kono
parents:
diff changeset
101 procedure Append
kono
parents:
diff changeset
102 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
103 New_Item : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
104 Drop : Truncation := Error);
kono
parents:
diff changeset
105
kono
parents:
diff changeset
106 procedure Append
kono
parents:
diff changeset
107 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
108 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
109 Drop : Truncation := Error);
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 procedure Append
kono
parents:
diff changeset
112 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
113 New_Item : Wide_Wide_Character;
kono
parents:
diff changeset
114 Drop : Truncation := Error);
kono
parents:
diff changeset
115
kono
parents:
diff changeset
116 function "&"
kono
parents:
diff changeset
117 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
118 Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 function "&"
kono
parents:
diff changeset
121 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
122 Right : Wide_Wide_String) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
123
kono
parents:
diff changeset
124 function "&"
kono
parents:
diff changeset
125 (Left : Wide_Wide_String;
kono
parents:
diff changeset
126 Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
127
kono
parents:
diff changeset
128 function "&"
kono
parents:
diff changeset
129 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
130 Right : Wide_Wide_Character) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
131
kono
parents:
diff changeset
132 function "&"
kono
parents:
diff changeset
133 (Left : Wide_Wide_Character;
kono
parents:
diff changeset
134 Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
135
kono
parents:
diff changeset
136 function Element
kono
parents:
diff changeset
137 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
138 Index : Positive) return Wide_Wide_Character;
kono
parents:
diff changeset
139
kono
parents:
diff changeset
140 procedure Replace_Element
kono
parents:
diff changeset
141 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
142 Index : Positive;
kono
parents:
diff changeset
143 By : Wide_Wide_Character);
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 function Slice
kono
parents:
diff changeset
146 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
147 Low : Positive;
kono
parents:
diff changeset
148 High : Natural) return Wide_Wide_String;
kono
parents:
diff changeset
149
kono
parents:
diff changeset
150 function Bounded_Slice
kono
parents:
diff changeset
151 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
152 Low : Positive;
kono
parents:
diff changeset
153 High : Natural) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
154 pragma Ada_05 (Bounded_Slice);
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 procedure Bounded_Slice
kono
parents:
diff changeset
157 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
158 Target : out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
159 Low : Positive;
kono
parents:
diff changeset
160 High : Natural);
kono
parents:
diff changeset
161 pragma Ada_05 (Bounded_Slice);
kono
parents:
diff changeset
162
kono
parents:
diff changeset
163 function "="
kono
parents:
diff changeset
164 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
165 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
166
kono
parents:
diff changeset
167 function "="
kono
parents:
diff changeset
168 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
169 Right : Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
170
kono
parents:
diff changeset
171 function "="
kono
parents:
diff changeset
172 (Left : Wide_Wide_String;
kono
parents:
diff changeset
173 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
174
kono
parents:
diff changeset
175 function "<"
kono
parents:
diff changeset
176 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
177 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 function "<"
kono
parents:
diff changeset
180 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
181 Right : Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
182
kono
parents:
diff changeset
183 function "<"
kono
parents:
diff changeset
184 (Left : Wide_Wide_String;
kono
parents:
diff changeset
185 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
186
kono
parents:
diff changeset
187 function "<="
kono
parents:
diff changeset
188 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
189 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
190
kono
parents:
diff changeset
191 function "<="
kono
parents:
diff changeset
192 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
193 Right : Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
194
kono
parents:
diff changeset
195 function "<="
kono
parents:
diff changeset
196 (Left : Wide_Wide_String;
kono
parents:
diff changeset
197 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
198
kono
parents:
diff changeset
199 function ">"
kono
parents:
diff changeset
200 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
201 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
202
kono
parents:
diff changeset
203 function ">"
kono
parents:
diff changeset
204 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
205 Right : Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
206
kono
parents:
diff changeset
207 function ">"
kono
parents:
diff changeset
208 (Left : Wide_Wide_String;
kono
parents:
diff changeset
209 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
210
kono
parents:
diff changeset
211 function ">="
kono
parents:
diff changeset
212 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
213 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
214
kono
parents:
diff changeset
215 function ">="
kono
parents:
diff changeset
216 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
217 Right : Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
218
kono
parents:
diff changeset
219 function ">="
kono
parents:
diff changeset
220 (Left : Wide_Wide_String;
kono
parents:
diff changeset
221 Right : Bounded_Wide_Wide_String) return Boolean;
kono
parents:
diff changeset
222
kono
parents:
diff changeset
223 ----------------------
kono
parents:
diff changeset
224 -- Search Functions --
kono
parents:
diff changeset
225 ----------------------
kono
parents:
diff changeset
226
kono
parents:
diff changeset
227 function Index
kono
parents:
diff changeset
228 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
229 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
230 Going : Direction := Forward;
kono
parents:
diff changeset
231 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
kono
parents:
diff changeset
232 Wide_Wide_Maps.Identity)
kono
parents:
diff changeset
233 return Natural;
kono
parents:
diff changeset
234
kono
parents:
diff changeset
235 function Index
kono
parents:
diff changeset
236 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
237 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
238 Going : Direction := Forward;
kono
parents:
diff changeset
239 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
kono
parents:
diff changeset
240 return Natural;
kono
parents:
diff changeset
241
kono
parents:
diff changeset
242 function Index
kono
parents:
diff changeset
243 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
244 Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
245 Test : Membership := Inside;
kono
parents:
diff changeset
246 Going : Direction := Forward) return Natural;
kono
parents:
diff changeset
247
kono
parents:
diff changeset
248 function Index
kono
parents:
diff changeset
249 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
250 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
251 From : Positive;
kono
parents:
diff changeset
252 Going : Direction := Forward;
kono
parents:
diff changeset
253 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
kono
parents:
diff changeset
254 Wide_Wide_Maps.Identity)
kono
parents:
diff changeset
255 return Natural;
kono
parents:
diff changeset
256 pragma Ada_05 (Index);
kono
parents:
diff changeset
257
kono
parents:
diff changeset
258 function Index
kono
parents:
diff changeset
259 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
260 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
261 From : Positive;
kono
parents:
diff changeset
262 Going : Direction := Forward;
kono
parents:
diff changeset
263 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
kono
parents:
diff changeset
264 return Natural;
kono
parents:
diff changeset
265 pragma Ada_05 (Index);
kono
parents:
diff changeset
266
kono
parents:
diff changeset
267 function Index
kono
parents:
diff changeset
268 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
269 Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
270 From : Positive;
kono
parents:
diff changeset
271 Test : Membership := Inside;
kono
parents:
diff changeset
272 Going : Direction := Forward) return Natural;
kono
parents:
diff changeset
273 pragma Ada_05 (Index);
kono
parents:
diff changeset
274
kono
parents:
diff changeset
275 function Index_Non_Blank
kono
parents:
diff changeset
276 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
277 Going : Direction := Forward) return Natural;
kono
parents:
diff changeset
278
kono
parents:
diff changeset
279 function Index_Non_Blank
kono
parents:
diff changeset
280 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
281 From : Positive;
kono
parents:
diff changeset
282 Going : Direction := Forward) return Natural;
kono
parents:
diff changeset
283 pragma Ada_05 (Index_Non_Blank);
kono
parents:
diff changeset
284
kono
parents:
diff changeset
285 function Count
kono
parents:
diff changeset
286 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
287 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
288 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
kono
parents:
diff changeset
289 Wide_Wide_Maps.Identity)
kono
parents:
diff changeset
290 return Natural;
kono
parents:
diff changeset
291
kono
parents:
diff changeset
292 function Count
kono
parents:
diff changeset
293 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
294 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
295 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
kono
parents:
diff changeset
296 return Natural;
kono
parents:
diff changeset
297
kono
parents:
diff changeset
298 function Count
kono
parents:
diff changeset
299 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
300 Set : Wide_Wide_Maps.Wide_Wide_Character_Set) return Natural;
kono
parents:
diff changeset
301
kono
parents:
diff changeset
302 procedure Find_Token
kono
parents:
diff changeset
303 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
304 Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
305 From : Positive;
kono
parents:
diff changeset
306 Test : Membership;
kono
parents:
diff changeset
307 First : out Positive;
kono
parents:
diff changeset
308 Last : out Natural);
kono
parents:
diff changeset
309 pragma Ada_2012 (Find_Token);
kono
parents:
diff changeset
310
kono
parents:
diff changeset
311 procedure Find_Token
kono
parents:
diff changeset
312 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
313 Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
314 Test : Membership;
kono
parents:
diff changeset
315 First : out Positive;
kono
parents:
diff changeset
316 Last : out Natural);
kono
parents:
diff changeset
317
kono
parents:
diff changeset
318 ------------------------------------
kono
parents:
diff changeset
319 -- String Translation Subprograms --
kono
parents:
diff changeset
320 ------------------------------------
kono
parents:
diff changeset
321
kono
parents:
diff changeset
322 function Translate
kono
parents:
diff changeset
323 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
324 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping)
kono
parents:
diff changeset
325 return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
326
kono
parents:
diff changeset
327 procedure Translate
kono
parents:
diff changeset
328 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
329 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping);
kono
parents:
diff changeset
330
kono
parents:
diff changeset
331 function Translate
kono
parents:
diff changeset
332 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
333 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
kono
parents:
diff changeset
334 return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
335
kono
parents:
diff changeset
336 procedure Translate
kono
parents:
diff changeset
337 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
338 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function);
kono
parents:
diff changeset
339
kono
parents:
diff changeset
340 ---------------------------------------
kono
parents:
diff changeset
341 -- String Transformation Subprograms --
kono
parents:
diff changeset
342 ---------------------------------------
kono
parents:
diff changeset
343
kono
parents:
diff changeset
344 function Replace_Slice
kono
parents:
diff changeset
345 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
346 Low : Positive;
kono
parents:
diff changeset
347 High : Natural;
kono
parents:
diff changeset
348 By : Wide_Wide_String;
kono
parents:
diff changeset
349 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
350
kono
parents:
diff changeset
351 procedure Replace_Slice
kono
parents:
diff changeset
352 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
353 Low : Positive;
kono
parents:
diff changeset
354 High : Natural;
kono
parents:
diff changeset
355 By : Wide_Wide_String;
kono
parents:
diff changeset
356 Drop : Truncation := Error);
kono
parents:
diff changeset
357
kono
parents:
diff changeset
358 function Insert
kono
parents:
diff changeset
359 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
360 Before : Positive;
kono
parents:
diff changeset
361 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
362 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
363
kono
parents:
diff changeset
364 procedure Insert
kono
parents:
diff changeset
365 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
366 Before : Positive;
kono
parents:
diff changeset
367 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
368 Drop : Truncation := Error);
kono
parents:
diff changeset
369
kono
parents:
diff changeset
370 function Overwrite
kono
parents:
diff changeset
371 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
372 Position : Positive;
kono
parents:
diff changeset
373 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
374 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
375
kono
parents:
diff changeset
376 procedure Overwrite
kono
parents:
diff changeset
377 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
378 Position : Positive;
kono
parents:
diff changeset
379 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
380 Drop : Truncation := Error);
kono
parents:
diff changeset
381
kono
parents:
diff changeset
382 function Delete
kono
parents:
diff changeset
383 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
384 From : Positive;
kono
parents:
diff changeset
385 Through : Natural) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
386
kono
parents:
diff changeset
387 procedure Delete
kono
parents:
diff changeset
388 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
389 From : Positive;
kono
parents:
diff changeset
390 Through : Natural);
kono
parents:
diff changeset
391
kono
parents:
diff changeset
392 ---------------------------------
kono
parents:
diff changeset
393 -- String Selector Subprograms --
kono
parents:
diff changeset
394 ---------------------------------
kono
parents:
diff changeset
395
kono
parents:
diff changeset
396 function Trim
kono
parents:
diff changeset
397 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
398 Side : Trim_End) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
399
kono
parents:
diff changeset
400 procedure Trim
kono
parents:
diff changeset
401 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
402 Side : Trim_End);
kono
parents:
diff changeset
403
kono
parents:
diff changeset
404 function Trim
kono
parents:
diff changeset
405 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
406 Left : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
407 Right : Wide_Wide_Maps.Wide_Wide_Character_Set)
kono
parents:
diff changeset
408 return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
409
kono
parents:
diff changeset
410 procedure Trim
kono
parents:
diff changeset
411 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
412 Left : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
413 Right : Wide_Wide_Maps.Wide_Wide_Character_Set);
kono
parents:
diff changeset
414
kono
parents:
diff changeset
415 function Head
kono
parents:
diff changeset
416 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
417 Count : Natural;
kono
parents:
diff changeset
418 Pad : Wide_Wide_Character := Wide_Wide_Space;
kono
parents:
diff changeset
419 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
420
kono
parents:
diff changeset
421 procedure Head
kono
parents:
diff changeset
422 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
423 Count : Natural;
kono
parents:
diff changeset
424 Pad : Wide_Wide_Character := Wide_Wide_Space;
kono
parents:
diff changeset
425 Drop : Truncation := Error);
kono
parents:
diff changeset
426
kono
parents:
diff changeset
427 function Tail
kono
parents:
diff changeset
428 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
429 Count : Natural;
kono
parents:
diff changeset
430 Pad : Wide_Wide_Character := Wide_Wide_Space;
kono
parents:
diff changeset
431 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
432
kono
parents:
diff changeset
433 procedure Tail
kono
parents:
diff changeset
434 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
435 Count : Natural;
kono
parents:
diff changeset
436 Pad : Wide_Wide_Character := Wide_Wide_Space;
kono
parents:
diff changeset
437 Drop : Truncation := Error);
kono
parents:
diff changeset
438
kono
parents:
diff changeset
439 ------------------------------------
kono
parents:
diff changeset
440 -- String Constructor Subprograms --
kono
parents:
diff changeset
441 ------------------------------------
kono
parents:
diff changeset
442
kono
parents:
diff changeset
443 function "*"
kono
parents:
diff changeset
444 (Left : Natural;
kono
parents:
diff changeset
445 Right : Wide_Wide_Character) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
446
kono
parents:
diff changeset
447 function "*"
kono
parents:
diff changeset
448 (Left : Natural;
kono
parents:
diff changeset
449 Right : Wide_Wide_String) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
450
kono
parents:
diff changeset
451 function "*"
kono
parents:
diff changeset
452 (Left : Natural;
kono
parents:
diff changeset
453 Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
454
kono
parents:
diff changeset
455 function Replicate
kono
parents:
diff changeset
456 (Count : Natural;
kono
parents:
diff changeset
457 Item : Wide_Wide_Character;
kono
parents:
diff changeset
458 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
459
kono
parents:
diff changeset
460 function Replicate
kono
parents:
diff changeset
461 (Count : Natural;
kono
parents:
diff changeset
462 Item : Wide_Wide_String;
kono
parents:
diff changeset
463 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
464
kono
parents:
diff changeset
465 function Replicate
kono
parents:
diff changeset
466 (Count : Natural;
kono
parents:
diff changeset
467 Item : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
468 Drop : Truncation := Error) return Bounded_Wide_Wide_String;
kono
parents:
diff changeset
469
kono
parents:
diff changeset
470 private
kono
parents:
diff changeset
471 -- Most of the implementation is in the separate non generic package
kono
parents:
diff changeset
472 -- Ada.Strings.Wide_Wide_Superbounded. Type Bounded_Wide_Wide_String is
kono
parents:
diff changeset
473 -- derived from type Wide_Wide_Superbounded.Super_String with the
kono
parents:
diff changeset
474 -- maximum length constraint. In almost all cases, the routines in
kono
parents:
diff changeset
475 -- Wide_Wide_Superbounded can be called with no requirement to pass the
kono
parents:
diff changeset
476 -- maximum length explicitly, since there is at least one
kono
parents:
diff changeset
477 -- Bounded_Wide_Wide_String argument from which the maximum length can
kono
parents:
diff changeset
478 -- be obtained. For all such routines, the implementation in this
kono
parents:
diff changeset
479 -- private part is simply renaming of the corresponding routine in the
kono
parents:
diff changeset
480 -- super bouded package.
kono
parents:
diff changeset
481
kono
parents:
diff changeset
482 -- The five exceptions are the * and Replicate routines operating on
kono
parents:
diff changeset
483 -- character values. For these cases, we have a routine in the body
kono
parents:
diff changeset
484 -- that calls the superbounded routine passing the maximum length
kono
parents:
diff changeset
485 -- explicitly as an extra parameter.
kono
parents:
diff changeset
486
kono
parents:
diff changeset
487 type Bounded_Wide_Wide_String is
kono
parents:
diff changeset
488 new Wide_Wide_Superbounded.Super_String (Max_Length);
kono
parents:
diff changeset
489 -- Deriving Bounded_Wide_Wide_String from
kono
parents:
diff changeset
490 -- Wide_Wide_Superbounded.Super_String is the real trick, it ensures
kono
parents:
diff changeset
491 -- that the type Bounded_Wide_Wide_String declared in the generic
kono
parents:
diff changeset
492 -- instantiation is compatible with the Super_String type declared in
kono
parents:
diff changeset
493 -- the Wide_Wide_Superbounded package.
kono
parents:
diff changeset
494
kono
parents:
diff changeset
495 Null_Bounded_Wide_Wide_String : constant Bounded_Wide_Wide_String :=
kono
parents:
diff changeset
496 (Max_Length => Max_Length,
kono
parents:
diff changeset
497 Current_Length => 0,
kono
parents:
diff changeset
498 Data =>
kono
parents:
diff changeset
499 (1 .. Max_Length =>
kono
parents:
diff changeset
500 Wide_Wide_Superbounded.Wide_Wide_NUL));
kono
parents:
diff changeset
501
kono
parents:
diff changeset
502 pragma Inline (To_Bounded_Wide_Wide_String);
kono
parents:
diff changeset
503
kono
parents:
diff changeset
504 procedure Set_Bounded_Wide_Wide_String
kono
parents:
diff changeset
505 (Target : out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
506 Source : Wide_Wide_String;
kono
parents:
diff changeset
507 Drop : Truncation := Error)
kono
parents:
diff changeset
508 renames Set_Super_String;
kono
parents:
diff changeset
509
kono
parents:
diff changeset
510 function Length
kono
parents:
diff changeset
511 (Source : Bounded_Wide_Wide_String) return Length_Range
kono
parents:
diff changeset
512 renames Super_Length;
kono
parents:
diff changeset
513
kono
parents:
diff changeset
514 function To_Wide_Wide_String
kono
parents:
diff changeset
515 (Source : Bounded_Wide_Wide_String) return Wide_Wide_String
kono
parents:
diff changeset
516 renames Super_To_String;
kono
parents:
diff changeset
517
kono
parents:
diff changeset
518 function Append
kono
parents:
diff changeset
519 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
520 Right : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
521 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
522 renames Super_Append;
kono
parents:
diff changeset
523
kono
parents:
diff changeset
524 function Append
kono
parents:
diff changeset
525 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
526 Right : Wide_Wide_String;
kono
parents:
diff changeset
527 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
528 renames Super_Append;
kono
parents:
diff changeset
529
kono
parents:
diff changeset
530 function Append
kono
parents:
diff changeset
531 (Left : Wide_Wide_String;
kono
parents:
diff changeset
532 Right : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
533 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
534 renames Super_Append;
kono
parents:
diff changeset
535
kono
parents:
diff changeset
536 function Append
kono
parents:
diff changeset
537 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
538 Right : Wide_Wide_Character;
kono
parents:
diff changeset
539 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
540 renames Super_Append;
kono
parents:
diff changeset
541
kono
parents:
diff changeset
542 function Append
kono
parents:
diff changeset
543 (Left : Wide_Wide_Character;
kono
parents:
diff changeset
544 Right : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
545 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
546 renames Super_Append;
kono
parents:
diff changeset
547
kono
parents:
diff changeset
548 procedure Append
kono
parents:
diff changeset
549 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
550 New_Item : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
551 Drop : Truncation := Error)
kono
parents:
diff changeset
552 renames Super_Append;
kono
parents:
diff changeset
553
kono
parents:
diff changeset
554 procedure Append
kono
parents:
diff changeset
555 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
556 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
557 Drop : Truncation := Error)
kono
parents:
diff changeset
558 renames Super_Append;
kono
parents:
diff changeset
559
kono
parents:
diff changeset
560 procedure Append
kono
parents:
diff changeset
561 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
562 New_Item : Wide_Wide_Character;
kono
parents:
diff changeset
563 Drop : Truncation := Error)
kono
parents:
diff changeset
564 renames Super_Append;
kono
parents:
diff changeset
565
kono
parents:
diff changeset
566 function "&"
kono
parents:
diff changeset
567 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
568 Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
569 renames Concat;
kono
parents:
diff changeset
570
kono
parents:
diff changeset
571 function "&"
kono
parents:
diff changeset
572 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
573 Right : Wide_Wide_String) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
574 renames Concat;
kono
parents:
diff changeset
575
kono
parents:
diff changeset
576 function "&"
kono
parents:
diff changeset
577 (Left : Wide_Wide_String;
kono
parents:
diff changeset
578 Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
579 renames Concat;
kono
parents:
diff changeset
580
kono
parents:
diff changeset
581 function "&"
kono
parents:
diff changeset
582 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
583 Right : Wide_Wide_Character) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
584 renames Concat;
kono
parents:
diff changeset
585
kono
parents:
diff changeset
586 function "&"
kono
parents:
diff changeset
587 (Left : Wide_Wide_Character;
kono
parents:
diff changeset
588 Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
589 renames Concat;
kono
parents:
diff changeset
590
kono
parents:
diff changeset
591 function Element
kono
parents:
diff changeset
592 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
593 Index : Positive) return Wide_Wide_Character
kono
parents:
diff changeset
594 renames Super_Element;
kono
parents:
diff changeset
595
kono
parents:
diff changeset
596 procedure Replace_Element
kono
parents:
diff changeset
597 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
598 Index : Positive;
kono
parents:
diff changeset
599 By : Wide_Wide_Character)
kono
parents:
diff changeset
600 renames Super_Replace_Element;
kono
parents:
diff changeset
601
kono
parents:
diff changeset
602 function Slice
kono
parents:
diff changeset
603 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
604 Low : Positive;
kono
parents:
diff changeset
605 High : Natural) return Wide_Wide_String
kono
parents:
diff changeset
606 renames Super_Slice;
kono
parents:
diff changeset
607
kono
parents:
diff changeset
608 function Bounded_Slice
kono
parents:
diff changeset
609 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
610 Low : Positive;
kono
parents:
diff changeset
611 High : Natural) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
612 renames Super_Slice;
kono
parents:
diff changeset
613
kono
parents:
diff changeset
614 procedure Bounded_Slice
kono
parents:
diff changeset
615 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
616 Target : out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
617 Low : Positive;
kono
parents:
diff changeset
618 High : Natural)
kono
parents:
diff changeset
619 renames Super_Slice;
kono
parents:
diff changeset
620
kono
parents:
diff changeset
621 overriding function "="
kono
parents:
diff changeset
622 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
623 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
624 renames Equal;
kono
parents:
diff changeset
625
kono
parents:
diff changeset
626 function "="
kono
parents:
diff changeset
627 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
628 Right : Wide_Wide_String) return Boolean
kono
parents:
diff changeset
629 renames Equal;
kono
parents:
diff changeset
630
kono
parents:
diff changeset
631 function "="
kono
parents:
diff changeset
632 (Left : Wide_Wide_String;
kono
parents:
diff changeset
633 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
634 renames Equal;
kono
parents:
diff changeset
635
kono
parents:
diff changeset
636 function "<"
kono
parents:
diff changeset
637 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
638 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
639 renames Less;
kono
parents:
diff changeset
640
kono
parents:
diff changeset
641 function "<"
kono
parents:
diff changeset
642 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
643 Right : Wide_Wide_String) return Boolean
kono
parents:
diff changeset
644 renames Less;
kono
parents:
diff changeset
645
kono
parents:
diff changeset
646 function "<"
kono
parents:
diff changeset
647 (Left : Wide_Wide_String;
kono
parents:
diff changeset
648 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
649 renames Less;
kono
parents:
diff changeset
650
kono
parents:
diff changeset
651 function "<="
kono
parents:
diff changeset
652 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
653 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
654 renames Less_Or_Equal;
kono
parents:
diff changeset
655
kono
parents:
diff changeset
656 function "<="
kono
parents:
diff changeset
657 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
658 Right : Wide_Wide_String) return Boolean
kono
parents:
diff changeset
659 renames Less_Or_Equal;
kono
parents:
diff changeset
660
kono
parents:
diff changeset
661 function "<="
kono
parents:
diff changeset
662 (Left : Wide_Wide_String;
kono
parents:
diff changeset
663 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
664 renames Less_Or_Equal;
kono
parents:
diff changeset
665
kono
parents:
diff changeset
666 function ">"
kono
parents:
diff changeset
667 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
668 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
669 renames Greater;
kono
parents:
diff changeset
670
kono
parents:
diff changeset
671 function ">"
kono
parents:
diff changeset
672 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
673 Right : Wide_Wide_String) return Boolean
kono
parents:
diff changeset
674 renames Greater;
kono
parents:
diff changeset
675
kono
parents:
diff changeset
676 function ">"
kono
parents:
diff changeset
677 (Left : Wide_Wide_String;
kono
parents:
diff changeset
678 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
679 renames Greater;
kono
parents:
diff changeset
680
kono
parents:
diff changeset
681 function ">="
kono
parents:
diff changeset
682 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
683 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
684 renames Greater_Or_Equal;
kono
parents:
diff changeset
685
kono
parents:
diff changeset
686 function ">="
kono
parents:
diff changeset
687 (Left : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
688 Right : Wide_Wide_String) return Boolean
kono
parents:
diff changeset
689 renames Greater_Or_Equal;
kono
parents:
diff changeset
690
kono
parents:
diff changeset
691 function ">="
kono
parents:
diff changeset
692 (Left : Wide_Wide_String;
kono
parents:
diff changeset
693 Right : Bounded_Wide_Wide_String) return Boolean
kono
parents:
diff changeset
694 renames Greater_Or_Equal;
kono
parents:
diff changeset
695
kono
parents:
diff changeset
696 function Index
kono
parents:
diff changeset
697 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
698 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
699 Going : Direction := Forward;
kono
parents:
diff changeset
700 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
kono
parents:
diff changeset
701 Wide_Wide_Maps.Identity)
kono
parents:
diff changeset
702 return Natural
kono
parents:
diff changeset
703 renames Super_Index;
kono
parents:
diff changeset
704
kono
parents:
diff changeset
705 function Index
kono
parents:
diff changeset
706 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
707 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
708 Going : Direction := Forward;
kono
parents:
diff changeset
709 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
kono
parents:
diff changeset
710 return Natural
kono
parents:
diff changeset
711 renames Super_Index;
kono
parents:
diff changeset
712
kono
parents:
diff changeset
713 function Index
kono
parents:
diff changeset
714 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
715 Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
716 Test : Membership := Inside;
kono
parents:
diff changeset
717 Going : Direction := Forward) return Natural
kono
parents:
diff changeset
718 renames Super_Index;
kono
parents:
diff changeset
719
kono
parents:
diff changeset
720 function Index
kono
parents:
diff changeset
721 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
722 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
723 From : Positive;
kono
parents:
diff changeset
724 Going : Direction := Forward;
kono
parents:
diff changeset
725 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
kono
parents:
diff changeset
726 Wide_Wide_Maps.Identity)
kono
parents:
diff changeset
727 return Natural
kono
parents:
diff changeset
728 renames Super_Index;
kono
parents:
diff changeset
729
kono
parents:
diff changeset
730 function Index
kono
parents:
diff changeset
731 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
732 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
733 From : Positive;
kono
parents:
diff changeset
734 Going : Direction := Forward;
kono
parents:
diff changeset
735 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
kono
parents:
diff changeset
736 return Natural
kono
parents:
diff changeset
737 renames Super_Index;
kono
parents:
diff changeset
738
kono
parents:
diff changeset
739 function Index
kono
parents:
diff changeset
740 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
741 Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
742 From : Positive;
kono
parents:
diff changeset
743 Test : Membership := Inside;
kono
parents:
diff changeset
744 Going : Direction := Forward) return Natural
kono
parents:
diff changeset
745 renames Super_Index;
kono
parents:
diff changeset
746
kono
parents:
diff changeset
747 function Index_Non_Blank
kono
parents:
diff changeset
748 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
749 Going : Direction := Forward) return Natural
kono
parents:
diff changeset
750 renames Super_Index_Non_Blank;
kono
parents:
diff changeset
751
kono
parents:
diff changeset
752 function Index_Non_Blank
kono
parents:
diff changeset
753 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
754 From : Positive;
kono
parents:
diff changeset
755 Going : Direction := Forward) return Natural
kono
parents:
diff changeset
756 renames Super_Index_Non_Blank;
kono
parents:
diff changeset
757
kono
parents:
diff changeset
758 function Count
kono
parents:
diff changeset
759 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
760 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
761 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping :=
kono
parents:
diff changeset
762 Wide_Wide_Maps.Identity)
kono
parents:
diff changeset
763 return Natural
kono
parents:
diff changeset
764 renames Super_Count;
kono
parents:
diff changeset
765
kono
parents:
diff changeset
766 function Count
kono
parents:
diff changeset
767 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
768 Pattern : Wide_Wide_String;
kono
parents:
diff changeset
769 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
kono
parents:
diff changeset
770 return Natural
kono
parents:
diff changeset
771 renames Super_Count;
kono
parents:
diff changeset
772
kono
parents:
diff changeset
773 function Count
kono
parents:
diff changeset
774 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
775 Set : Wide_Wide_Maps.Wide_Wide_Character_Set) return Natural
kono
parents:
diff changeset
776 renames Super_Count;
kono
parents:
diff changeset
777
kono
parents:
diff changeset
778 procedure Find_Token
kono
parents:
diff changeset
779 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
780 Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
781 From : Positive;
kono
parents:
diff changeset
782 Test : Membership;
kono
parents:
diff changeset
783 First : out Positive;
kono
parents:
diff changeset
784 Last : out Natural)
kono
parents:
diff changeset
785 renames Super_Find_Token;
kono
parents:
diff changeset
786
kono
parents:
diff changeset
787 procedure Find_Token
kono
parents:
diff changeset
788 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
789 Set : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
790 Test : Membership;
kono
parents:
diff changeset
791 First : out Positive;
kono
parents:
diff changeset
792 Last : out Natural)
kono
parents:
diff changeset
793 renames Super_Find_Token;
kono
parents:
diff changeset
794
kono
parents:
diff changeset
795 function Translate
kono
parents:
diff changeset
796 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
797 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping)
kono
parents:
diff changeset
798 return Bounded_Wide_Wide_String
kono
parents:
diff changeset
799 renames Super_Translate;
kono
parents:
diff changeset
800
kono
parents:
diff changeset
801 procedure Translate
kono
parents:
diff changeset
802 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
803 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping)
kono
parents:
diff changeset
804 renames Super_Translate;
kono
parents:
diff changeset
805
kono
parents:
diff changeset
806 function Translate
kono
parents:
diff changeset
807 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
808 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
kono
parents:
diff changeset
809 return Bounded_Wide_Wide_String
kono
parents:
diff changeset
810 renames Super_Translate;
kono
parents:
diff changeset
811
kono
parents:
diff changeset
812 procedure Translate
kono
parents:
diff changeset
813 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
814 Mapping : Wide_Wide_Maps.Wide_Wide_Character_Mapping_Function)
kono
parents:
diff changeset
815 renames Super_Translate;
kono
parents:
diff changeset
816
kono
parents:
diff changeset
817 function Replace_Slice
kono
parents:
diff changeset
818 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
819 Low : Positive;
kono
parents:
diff changeset
820 High : Natural;
kono
parents:
diff changeset
821 By : Wide_Wide_String;
kono
parents:
diff changeset
822 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
823 renames Super_Replace_Slice;
kono
parents:
diff changeset
824
kono
parents:
diff changeset
825 procedure Replace_Slice
kono
parents:
diff changeset
826 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
827 Low : Positive;
kono
parents:
diff changeset
828 High : Natural;
kono
parents:
diff changeset
829 By : Wide_Wide_String;
kono
parents:
diff changeset
830 Drop : Truncation := Error)
kono
parents:
diff changeset
831 renames Super_Replace_Slice;
kono
parents:
diff changeset
832
kono
parents:
diff changeset
833 function Insert
kono
parents:
diff changeset
834 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
835 Before : Positive;
kono
parents:
diff changeset
836 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
837 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
838 renames Super_Insert;
kono
parents:
diff changeset
839
kono
parents:
diff changeset
840 procedure Insert
kono
parents:
diff changeset
841 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
842 Before : Positive;
kono
parents:
diff changeset
843 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
844 Drop : Truncation := Error)
kono
parents:
diff changeset
845 renames Super_Insert;
kono
parents:
diff changeset
846
kono
parents:
diff changeset
847 function Overwrite
kono
parents:
diff changeset
848 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
849 Position : Positive;
kono
parents:
diff changeset
850 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
851 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
852 renames Super_Overwrite;
kono
parents:
diff changeset
853
kono
parents:
diff changeset
854 procedure Overwrite
kono
parents:
diff changeset
855 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
856 Position : Positive;
kono
parents:
diff changeset
857 New_Item : Wide_Wide_String;
kono
parents:
diff changeset
858 Drop : Truncation := Error)
kono
parents:
diff changeset
859 renames Super_Overwrite;
kono
parents:
diff changeset
860
kono
parents:
diff changeset
861 function Delete
kono
parents:
diff changeset
862 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
863 From : Positive;
kono
parents:
diff changeset
864 Through : Natural) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
865 renames Super_Delete;
kono
parents:
diff changeset
866
kono
parents:
diff changeset
867 procedure Delete
kono
parents:
diff changeset
868 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
869 From : Positive;
kono
parents:
diff changeset
870 Through : Natural)
kono
parents:
diff changeset
871 renames Super_Delete;
kono
parents:
diff changeset
872
kono
parents:
diff changeset
873 function Trim
kono
parents:
diff changeset
874 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
875 Side : Trim_End) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
876 renames Super_Trim;
kono
parents:
diff changeset
877
kono
parents:
diff changeset
878 procedure Trim
kono
parents:
diff changeset
879 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
880 Side : Trim_End)
kono
parents:
diff changeset
881 renames Super_Trim;
kono
parents:
diff changeset
882
kono
parents:
diff changeset
883 function Trim
kono
parents:
diff changeset
884 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
885 Left : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
886 Right : Wide_Wide_Maps.Wide_Wide_Character_Set)
kono
parents:
diff changeset
887 return Bounded_Wide_Wide_String
kono
parents:
diff changeset
888 renames Super_Trim;
kono
parents:
diff changeset
889
kono
parents:
diff changeset
890 procedure Trim
kono
parents:
diff changeset
891 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
892 Left : Wide_Wide_Maps.Wide_Wide_Character_Set;
kono
parents:
diff changeset
893 Right : Wide_Wide_Maps.Wide_Wide_Character_Set)
kono
parents:
diff changeset
894 renames Super_Trim;
kono
parents:
diff changeset
895
kono
parents:
diff changeset
896 function Head
kono
parents:
diff changeset
897 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
898 Count : Natural;
kono
parents:
diff changeset
899 Pad : Wide_Wide_Character := Wide_Wide_Space;
kono
parents:
diff changeset
900 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
901 renames Super_Head;
kono
parents:
diff changeset
902
kono
parents:
diff changeset
903 procedure Head
kono
parents:
diff changeset
904 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
905 Count : Natural;
kono
parents:
diff changeset
906 Pad : Wide_Wide_Character := Wide_Wide_Space;
kono
parents:
diff changeset
907 Drop : Truncation := Error)
kono
parents:
diff changeset
908 renames Super_Head;
kono
parents:
diff changeset
909
kono
parents:
diff changeset
910 function Tail
kono
parents:
diff changeset
911 (Source : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
912 Count : Natural;
kono
parents:
diff changeset
913 Pad : Wide_Wide_Character := Wide_Wide_Space;
kono
parents:
diff changeset
914 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
915 renames Super_Tail;
kono
parents:
diff changeset
916
kono
parents:
diff changeset
917 procedure Tail
kono
parents:
diff changeset
918 (Source : in out Bounded_Wide_Wide_String;
kono
parents:
diff changeset
919 Count : Natural;
kono
parents:
diff changeset
920 Pad : Wide_Wide_Character := Wide_Wide_Space;
kono
parents:
diff changeset
921 Drop : Truncation := Error)
kono
parents:
diff changeset
922 renames Super_Tail;
kono
parents:
diff changeset
923
kono
parents:
diff changeset
924 function "*"
kono
parents:
diff changeset
925 (Left : Natural;
kono
parents:
diff changeset
926 Right : Bounded_Wide_Wide_String) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
927 renames Times;
kono
parents:
diff changeset
928
kono
parents:
diff changeset
929 function Replicate
kono
parents:
diff changeset
930 (Count : Natural;
kono
parents:
diff changeset
931 Item : Bounded_Wide_Wide_String;
kono
parents:
diff changeset
932 Drop : Truncation := Error) return Bounded_Wide_Wide_String
kono
parents:
diff changeset
933 renames Super_Replicate;
kono
parents:
diff changeset
934
kono
parents:
diff changeset
935 end Generic_Bounded_Length;
kono
parents:
diff changeset
936
kono
parents:
diff changeset
937 end Ada.Strings.Wide_Wide_Bounded;