1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- A D A . S T R I N G S . 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_Maps
;
18 package Ada
.Strings
.Wide_Fixed
is
21 -------------------------------------------------------------------
22 -- Copy Procedure for Wide_Strings of Possibly Different Lengths --
23 -------------------------------------------------------------------
26 (Source
: Wide_String;
27 Target
: out Wide_String;
28 Drop
: Truncation
:= Error
;
29 Justify
: Alignment
:= Left
;
30 Pad
: Wide_Character := Ada
.Strings
.Wide_Space
);
32 ------------------------
33 -- Search Subprograms --
34 ------------------------
37 (Source
: Wide_String;
38 Pattern
: Wide_String;
39 Going
: Direction
:= Forward
;
40 Mapping
: Wide_Maps
.Wide_Character_Mapping
:= Wide_Maps
.Identity
)
44 (Source
: Wide_String;
45 Pattern
: Wide_String;
46 Going
: Direction
:= Forward
;
47 Mapping
: Wide_Maps
.Wide_Character_Mapping_Function
) return Natural;
50 (Source
: Wide_String;
51 Set
: Wide_Maps
.Wide_Character_Set
;
52 Test
: Membership
:= Inside
;
53 Going
: Direction
:= Forward
) return Natural;
56 (Source
: Wide_String;
57 Pattern
: Wide_String;
59 Going
: Direction
:= Forward
;
60 Mapping
: Wide_Maps
.Wide_Character_Mapping
:= Wide_Maps
.Identity
)
62 pragma Ada_05
(Index
);
65 (Source
: Wide_String;
66 Pattern
: Wide_String;
68 Going
: Direction
:= Forward
;
69 Mapping
: Wide_Maps
.Wide_Character_Mapping_Function
) return Natural;
70 pragma Ada_05
(Index
);
73 (Source
: Wide_String;
74 Set
: Wide_Maps
.Wide_Character_Set
;
76 Test
: Membership
:= Inside
;
77 Going
: Direction
:= Forward
) return Natural;
78 pragma Ada_05
(Index
);
80 function Index_Non_Blank
81 (Source
: Wide_String;
82 Going
: Direction
:= Forward
) return Natural;
84 function Index_Non_Blank
85 (Source
: Wide_String;
87 Going
: Direction
:= Forward
) return Natural;
88 pragma Ada_05
(Index_Non_Blank
);
91 (Source
: Wide_String;
92 Pattern
: Wide_String;
93 Mapping
: Wide_Maps
.Wide_Character_Mapping
:= Wide_Maps
.Identity
)
97 (Source
: Wide_String;
98 Pattern
: Wide_String;
99 Mapping
: Wide_Maps
.Wide_Character_Mapping_Function
) return Natural;
102 (Source
: Wide_String;
103 Set
: Wide_Maps
.Wide_Character_Set
) return Natural;
106 (Source
: Wide_String;
107 Set
: Wide_Maps
.Wide_Character_Set
;
110 First
: out Positive;
112 pragma Ada_2012
(Find_Token
);
115 (Source
: Wide_String;
116 Set
: Wide_Maps
.Wide_Character_Set
;
118 First
: out Positive;
121 -----------------------------------------
122 -- Wide_String Translation Subprograms --
123 -----------------------------------------
126 (Source
: Wide_String;
127 Mapping
: Wide_Maps
.Wide_Character_Mapping
) return Wide_String;
130 (Source
: in out Wide_String;
131 Mapping
: Wide_Maps
.Wide_Character_Mapping
);
134 (Source
: Wide_String;
135 Mapping
: Wide_Maps
.Wide_Character_Mapping_Function
) return Wide_String;
138 (Source
: in out Wide_String;
139 Mapping
: Wide_Maps
.Wide_Character_Mapping_Function
);
141 --------------------------------------------
142 -- Wide_String Transformation Subprograms --
143 --------------------------------------------
145 function Replace_Slice
146 (Source
: Wide_String;
149 By
: Wide_String) return Wide_String;
151 procedure Replace_Slice
152 (Source
: in out Wide_String;
156 Drop
: Truncation
:= Error
;
157 Justify
: Alignment
:= Left
;
158 Pad
: Wide_Character := Ada
.Strings
.Wide_Space
);
161 (Source
: Wide_String;
163 New_Item
: Wide_String) return Wide_String;
166 (Source
: in out Wide_String;
168 New_Item
: Wide_String;
169 Drop
: Truncation
:= Error
);
172 (Source
: Wide_String;
174 New_Item
: Wide_String) return Wide_String;
177 (Source
: in out Wide_String;
179 New_Item
: Wide_String;
180 Drop
: Truncation
:= Right
);
183 (Source
: Wide_String;
185 Through
: Natural) return Wide_String;
188 (Source
: in out Wide_String;
191 Justify
: Alignment
:= Left
;
192 Pad
: Wide_Character := Ada
.Strings
.Wide_Space
);
194 --------------------------------------
195 -- Wide_String Selector Subprograms --
196 --------------------------------------
199 (Source
: Wide_String;
200 Side
: Trim_End
) return Wide_String;
203 (Source
: in out Wide_String;
205 Justify
: Alignment
:= Left
;
206 Pad
: Wide_Character := Wide_Space
);
209 (Source
: Wide_String;
210 Left
: Wide_Maps
.Wide_Character_Set
;
211 Right
: Wide_Maps
.Wide_Character_Set
) return Wide_String;
214 (Source
: in out Wide_String;
215 Left
: Wide_Maps
.Wide_Character_Set
;
216 Right
: Wide_Maps
.Wide_Character_Set
;
217 Justify
: Alignment
:= Ada
.Strings
.Left
;
218 Pad
: Wide_Character := Ada
.Strings
.Wide_Space
);
221 (Source
: Wide_String;
223 Pad
: Wide_Character := Ada
.Strings
.Wide_Space
) return Wide_String;
226 (Source
: in out Wide_String;
228 Justify
: Alignment
:= Left
;
229 Pad
: Wide_Character := Ada
.Strings
.Wide_Space
);
232 (Source
: Wide_String;
234 Pad
: Wide_Character := Ada
.Strings
.Wide_Space
) return Wide_String;
237 (Source
: in out Wide_String;
239 Justify
: Alignment
:= Left
;
240 Pad
: Wide_Character := Ada
.Strings
.Wide_Space
);
242 ---------------------------------------
243 -- Wide_String Constructor Functions --
244 ---------------------------------------
248 Right
: Wide_Character) return Wide_String;
252 Right
: Wide_String) return Wide_String;
254 end Ada
.Strings
.Wide_Fixed
;