OSDN Git Service

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