OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [ada/] [a-stzbou.ads] - Blame information for rev 756

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.