1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- A D A . S T R I N G S . W I D E _ W I D E _ F I X E D --
9 -- This specification is derived from the Ada Reference Manual for use with --
10 -- GNAT. In accordance with the copyright of that document, you can freely --
11 -- copy and modify this specification, provided that if you redistribute a --
12 -- modified version, any changes that you have made are clearly indicated. --
14 ------------------------------------------------------------------------------
16 with Ada
.Strings
.Wide_Wide_Maps
;
18 package Ada
.Strings
.Wide_Wide_Fixed
is
21 ------------------------------------------------------------------------
22 -- Copy Procedure for Wide_Wide_Strings of Possibly Different Lengths --
23 ------------------------------------------------------------------------
26 (Source
: Wide_Wide_String
;
27 Target
: out Wide_Wide_String
;
28 Drop
: Truncation
:= Error
;
29 Justify
: Alignment
:= Left
;
30 Pad
: Wide_Wide_Character
:= Ada
.Strings
.Wide_Wide_Space
);
32 ------------------------
33 -- Search Subprograms --
34 ------------------------
37 (Source
: Wide_Wide_String
;
38 Pattern
: Wide_Wide_String
;
39 Going
: Direction
:= Forward
;
40 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping
:=
41 Wide_Wide_Maps
.Identity
) return Natural;
44 (Source
: Wide_Wide_String
;
45 Pattern
: Wide_Wide_String
;
46 Going
: Direction
:= Forward
;
47 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping_Function
)
51 (Source
: Wide_Wide_String
;
52 Set
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
53 Test
: Membership
:= Inside
;
54 Going
: Direction
:= Forward
) return Natural;
57 (Source
: Wide_Wide_String
;
58 Pattern
: Wide_Wide_String
;
60 Going
: Direction
:= Forward
;
61 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping
:=
62 Wide_Wide_Maps
.Identity
)
64 pragma Ada_05
(Index
);
67 (Source
: Wide_Wide_String
;
68 Pattern
: Wide_Wide_String
;
70 Going
: Direction
:= Forward
;
71 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping_Function
)
73 pragma Ada_05
(Index
);
76 (Source
: Wide_Wide_String
;
77 Set
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
79 Test
: Membership
:= Inside
;
80 Going
: Direction
:= Forward
) return Natural;
81 pragma Ada_05
(Index
);
83 function Index_Non_Blank
84 (Source
: Wide_Wide_String
;
85 Going
: Direction
:= Forward
) return Natural;
87 function Index_Non_Blank
88 (Source
: Wide_Wide_String
;
90 Going
: Direction
:= Forward
) return Natural;
91 pragma Ada_05
(Index_Non_Blank
);
94 (Source
: Wide_Wide_String
;
95 Pattern
: Wide_Wide_String
;
96 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping
:=
97 Wide_Wide_Maps
.Identity
)
101 (Source
: Wide_Wide_String
;
102 Pattern
: Wide_Wide_String
;
103 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping_Function
)
107 (Source
: Wide_Wide_String
;
108 Set
: Wide_Wide_Maps
.Wide_Wide_Character_Set
) return Natural;
111 (Source
: Wide_Wide_String
;
112 Set
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
115 First
: out Positive;
117 pragma Ada_2012
(Find_Token
);
120 (Source
: Wide_Wide_String
;
121 Set
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
123 First
: out Positive;
126 ----------------------------------------------
127 -- Wide_Wide_String Translation Subprograms --
128 ----------------------------------------------
131 (Source
: Wide_Wide_String
;
132 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping
)
133 return Wide_Wide_String
;
136 (Source
: in out Wide_Wide_String
;
137 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping
);
140 (Source
: Wide_Wide_String
;
141 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping_Function
)
142 return Wide_Wide_String
;
145 (Source
: in out Wide_Wide_String
;
146 Mapping
: Wide_Wide_Maps
.Wide_Wide_Character_Mapping_Function
);
148 -------------------------------------------------
149 -- Wide_Wide_String Transformation Subprograms --
150 -------------------------------------------------
152 function Replace_Slice
153 (Source
: Wide_Wide_String
;
156 By
: Wide_Wide_String
) return Wide_Wide_String
;
158 procedure Replace_Slice
159 (Source
: in out Wide_Wide_String
;
162 By
: Wide_Wide_String
;
163 Drop
: Truncation
:= Error
;
164 Justify
: Alignment
:= Left
;
165 Pad
: Wide_Wide_Character
:= Ada
.Strings
.Wide_Wide_Space
);
168 (Source
: Wide_Wide_String
;
170 New_Item
: Wide_Wide_String
) return Wide_Wide_String
;
173 (Source
: in out Wide_Wide_String
;
175 New_Item
: Wide_Wide_String
;
176 Drop
: Truncation
:= Error
);
179 (Source
: Wide_Wide_String
;
181 New_Item
: Wide_Wide_String
) return Wide_Wide_String
;
184 (Source
: in out Wide_Wide_String
;
186 New_Item
: Wide_Wide_String
;
187 Drop
: Truncation
:= Right
);
190 (Source
: Wide_Wide_String
;
192 Through
: Natural) return Wide_Wide_String
;
195 (Source
: in out Wide_Wide_String
;
198 Justify
: Alignment
:= Left
;
199 Pad
: Wide_Wide_Character
:= Ada
.Strings
.Wide_Wide_Space
);
201 -------------------------------------------
202 -- Wide_Wide_String Selector Subprograms --
203 -------------------------------------------
206 (Source
: Wide_Wide_String
;
207 Side
: Trim_End
) return Wide_Wide_String
;
210 (Source
: in out Wide_Wide_String
;
212 Justify
: Alignment
:= Left
;
213 Pad
: Wide_Wide_Character
:= Wide_Wide_Space
);
216 (Source
: Wide_Wide_String
;
217 Left
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
218 Right
: Wide_Wide_Maps
.Wide_Wide_Character_Set
)
219 return Wide_Wide_String
;
222 (Source
: in out Wide_Wide_String
;
223 Left
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
224 Right
: Wide_Wide_Maps
.Wide_Wide_Character_Set
;
225 Justify
: Alignment
:= Ada
.Strings
.Left
;
226 Pad
: Wide_Wide_Character
:= Ada
.Strings
.Wide_Wide_Space
);
229 (Source
: Wide_Wide_String
;
231 Pad
: Wide_Wide_Character
:= Ada
.Strings
.Wide_Wide_Space
)
232 return Wide_Wide_String
;
235 (Source
: in out Wide_Wide_String
;
237 Justify
: Alignment
:= Left
;
238 Pad
: Wide_Wide_Character
:= Ada
.Strings
.Wide_Wide_Space
);
241 (Source
: Wide_Wide_String
;
243 Pad
: Wide_Wide_Character
:= Ada
.Strings
.Wide_Wide_Space
)
244 return Wide_Wide_String
;
247 (Source
: in out Wide_Wide_String
;
249 Justify
: Alignment
:= Left
;
250 Pad
: Wide_Wide_Character
:= Ada
.Strings
.Wide_Wide_Space
);
252 --------------------------------------------
253 -- Wide_Wide_String Constructor Functions --
254 --------------------------------------------
258 Right
: Wide_Wide_Character
) return Wide_Wide_String
;
262 Right
: Wide_Wide_String
) return Wide_Wide_String
;
264 end Ada
.Strings
.Wide_Wide_Fixed
;