Mark ChangeLog
[official-gcc.git] / gcc / ada / a-stwifi.ads
blob177e2f8011d4bffff9af399877019e6bf0d88f1e
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUNTIME COMPONENTS --
4 -- --
5 -- A D A . S T R I N G S . W I D E _ F I X E D --
6 -- --
7 -- S p e c --
8 -- --
9 -- This specification is adapted 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. --
13 -- --
14 ------------------------------------------------------------------------------
17 with Ada.Strings.Wide_Maps;
19 package Ada.Strings.Wide_Fixed is
20 pragma Preelaborate (Wide_Fixed);
22 -------------------------------------------------------------------
23 -- Copy Procedure for Wide_Strings of Possibly Different Lengths --
24 -------------------------------------------------------------------
26 procedure Move
27 (Source : Wide_String;
28 Target : out Wide_String;
29 Drop : Truncation := Error;
30 Justify : Alignment := Left;
31 Pad : Wide_Character := Ada.Strings.Wide_Space);
33 ------------------------
34 -- Search Subprograms --
35 ------------------------
37 function Index
38 (Source : Wide_String;
39 Pattern : Wide_String;
40 Going : Direction := Forward;
41 Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
42 return Natural;
44 function Index
45 (Source : Wide_String;
46 Pattern : Wide_String;
47 Going : Direction := Forward;
48 Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
50 function Index
51 (Source : Wide_String;
52 Set : Wide_Maps.Wide_Character_Set;
53 Test : Membership := Inside;
54 Going : Direction := Forward) return Natural;
56 function Index
57 (Source : Wide_String;
58 Pattern : Wide_String;
59 From : Positive;
60 Going : Direction := Forward;
61 Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
62 return Natural;
63 pragma Ada_05 (Index);
65 function Index
66 (Source : Wide_String;
67 Pattern : Wide_String;
68 From : Positive;
69 Going : Direction := Forward;
70 Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
71 pragma Ada_05 (Index);
73 function Index
74 (Source : Wide_String;
75 Set : Wide_Maps.Wide_Character_Set;
76 From : Positive;
77 Test : Membership := Inside;
78 Going : Direction := Forward) return Natural;
79 pragma Ada_05 (Index);
81 function Index_Non_Blank
82 (Source : Wide_String;
83 Going : Direction := Forward) return Natural;
85 function Index_Non_Blank
86 (Source : Wide_String;
87 From : Positive;
88 Going : Direction := Forward) return Natural;
89 pragma Ada_05 (Index_Non_Blank);
91 function Count
92 (Source : Wide_String;
93 Pattern : Wide_String;
94 Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
95 return Natural;
97 function Count
98 (Source : Wide_String;
99 Pattern : Wide_String;
100 Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
102 function Count
103 (Source : Wide_String;
104 Set : Wide_Maps.Wide_Character_Set) return Natural;
106 procedure Find_Token
107 (Source : Wide_String;
108 Set : Wide_Maps.Wide_Character_Set;
109 Test : Membership;
110 First : out Positive;
111 Last : out Natural);
113 -----------------------------------------
114 -- Wide_String Translation Subprograms --
115 -----------------------------------------
117 function Translate
118 (Source : Wide_String;
119 Mapping : Wide_Maps.Wide_Character_Mapping) return Wide_String;
121 procedure Translate
122 (Source : in out Wide_String;
123 Mapping : Wide_Maps.Wide_Character_Mapping);
125 function Translate
126 (Source : Wide_String;
127 Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Wide_String;
129 procedure Translate
130 (Source : in out Wide_String;
131 Mapping : Wide_Maps.Wide_Character_Mapping_Function);
133 --------------------------------------------
134 -- Wide_String Transformation Subprograms --
135 --------------------------------------------
137 function Replace_Slice
138 (Source : Wide_String;
139 Low : Positive;
140 High : Natural;
141 By : Wide_String) return Wide_String;
143 procedure Replace_Slice
144 (Source : in out Wide_String;
145 Low : Positive;
146 High : Natural;
147 By : Wide_String;
148 Drop : Truncation := Error;
149 Justify : Alignment := Left;
150 Pad : Wide_Character := Ada.Strings.Wide_Space);
152 function Insert
153 (Source : Wide_String;
154 Before : Positive;
155 New_Item : Wide_String) return Wide_String;
157 procedure Insert
158 (Source : in out Wide_String;
159 Before : Positive;
160 New_Item : Wide_String;
161 Drop : Truncation := Error);
163 function Overwrite
164 (Source : Wide_String;
165 Position : Positive;
166 New_Item : Wide_String) return Wide_String;
168 procedure Overwrite
169 (Source : in out Wide_String;
170 Position : Positive;
171 New_Item : Wide_String;
172 Drop : Truncation := Right);
174 function Delete
175 (Source : Wide_String;
176 From : Positive;
177 Through : Natural) return Wide_String;
179 procedure Delete
180 (Source : in out Wide_String;
181 From : Positive;
182 Through : Natural;
183 Justify : Alignment := Left;
184 Pad : Wide_Character := Ada.Strings.Wide_Space);
186 --------------------------------------
187 -- Wide_String Selector Subprograms --
188 --------------------------------------
190 function Trim
191 (Source : Wide_String;
192 Side : Trim_End) return Wide_String;
194 procedure Trim
195 (Source : in out Wide_String;
196 Side : Trim_End;
197 Justify : Alignment := Left;
198 Pad : Wide_Character := Wide_Space);
200 function Trim
201 (Source : Wide_String;
202 Left : Wide_Maps.Wide_Character_Set;
203 Right : Wide_Maps.Wide_Character_Set) return Wide_String;
205 procedure Trim
206 (Source : in out Wide_String;
207 Left : Wide_Maps.Wide_Character_Set;
208 Right : Wide_Maps.Wide_Character_Set;
209 Justify : Alignment := Ada.Strings.Left;
210 Pad : Wide_Character := Ada.Strings.Wide_Space);
212 function Head
213 (Source : Wide_String;
214 Count : Natural;
215 Pad : Wide_Character := Ada.Strings.Wide_Space) return Wide_String;
217 procedure Head
218 (Source : in out Wide_String;
219 Count : Natural;
220 Justify : Alignment := Left;
221 Pad : Wide_Character := Ada.Strings.Wide_Space);
223 function Tail
224 (Source : Wide_String;
225 Count : Natural;
226 Pad : Wide_Character := Ada.Strings.Wide_Space) return Wide_String;
228 procedure Tail
229 (Source : in out Wide_String;
230 Count : Natural;
231 Justify : Alignment := Left;
232 Pad : Wide_Character := Ada.Strings.Wide_Space);
234 ---------------------------------------
235 -- Wide_String Constructor Functions --
236 ---------------------------------------
238 function "*"
239 (Left : Natural;
240 Right : Wide_Character) return Wide_String;
242 function "*"
243 (Left : Natural;
244 Right : Wide_String) return Wide_String;
246 end Ada.Strings.Wide_Fixed;