gcc:
[official-gcc.git] / gcc / ada / a-stwifi.ads
blobbe2e03803fbfeed9dc37980c8d56a1602e4b8a0b
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME 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 ------------------------------------------------------------------------------
16 with Ada.Strings.Wide_Maps;
18 package Ada.Strings.Wide_Fixed is
19 pragma Preelaborate;
21 -------------------------------------------------------------------
22 -- Copy Procedure for Wide_Strings of Possibly Different Lengths --
23 -------------------------------------------------------------------
25 procedure Move
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 ------------------------
36 function Index
37 (Source : Wide_String;
38 Pattern : Wide_String;
39 Going : Direction := Forward;
40 Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
41 return Natural;
43 function Index
44 (Source : Wide_String;
45 Pattern : Wide_String;
46 Going : Direction := Forward;
47 Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
49 function Index
50 (Source : Wide_String;
51 Set : Wide_Maps.Wide_Character_Set;
52 Test : Membership := Inside;
53 Going : Direction := Forward) return Natural;
55 function Index
56 (Source : Wide_String;
57 Pattern : Wide_String;
58 From : Positive;
59 Going : Direction := Forward;
60 Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
61 return Natural;
62 pragma Ada_05 (Index);
64 function Index
65 (Source : Wide_String;
66 Pattern : Wide_String;
67 From : Positive;
68 Going : Direction := Forward;
69 Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
70 pragma Ada_05 (Index);
72 function Index
73 (Source : Wide_String;
74 Set : Wide_Maps.Wide_Character_Set;
75 From : Positive;
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;
86 From : Positive;
87 Going : Direction := Forward) return Natural;
88 pragma Ada_05 (Index_Non_Blank);
90 function Count
91 (Source : Wide_String;
92 Pattern : Wide_String;
93 Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
94 return Natural;
96 function Count
97 (Source : Wide_String;
98 Pattern : Wide_String;
99 Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural;
101 function Count
102 (Source : Wide_String;
103 Set : Wide_Maps.Wide_Character_Set) return Natural;
105 procedure Find_Token
106 (Source : Wide_String;
107 Set : Wide_Maps.Wide_Character_Set;
108 Test : Membership;
109 First : out Positive;
110 Last : out Natural);
112 -----------------------------------------
113 -- Wide_String Translation Subprograms --
114 -----------------------------------------
116 function Translate
117 (Source : Wide_String;
118 Mapping : Wide_Maps.Wide_Character_Mapping) return Wide_String;
120 procedure Translate
121 (Source : in out Wide_String;
122 Mapping : Wide_Maps.Wide_Character_Mapping);
124 function Translate
125 (Source : Wide_String;
126 Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Wide_String;
128 procedure Translate
129 (Source : in out Wide_String;
130 Mapping : Wide_Maps.Wide_Character_Mapping_Function);
132 --------------------------------------------
133 -- Wide_String Transformation Subprograms --
134 --------------------------------------------
136 function Replace_Slice
137 (Source : Wide_String;
138 Low : Positive;
139 High : Natural;
140 By : Wide_String) return Wide_String;
142 procedure Replace_Slice
143 (Source : in out Wide_String;
144 Low : Positive;
145 High : Natural;
146 By : Wide_String;
147 Drop : Truncation := Error;
148 Justify : Alignment := Left;
149 Pad : Wide_Character := Ada.Strings.Wide_Space);
151 function Insert
152 (Source : Wide_String;
153 Before : Positive;
154 New_Item : Wide_String) return Wide_String;
156 procedure Insert
157 (Source : in out Wide_String;
158 Before : Positive;
159 New_Item : Wide_String;
160 Drop : Truncation := Error);
162 function Overwrite
163 (Source : Wide_String;
164 Position : Positive;
165 New_Item : Wide_String) return Wide_String;
167 procedure Overwrite
168 (Source : in out Wide_String;
169 Position : Positive;
170 New_Item : Wide_String;
171 Drop : Truncation := Right);
173 function Delete
174 (Source : Wide_String;
175 From : Positive;
176 Through : Natural) return Wide_String;
178 procedure Delete
179 (Source : in out Wide_String;
180 From : Positive;
181 Through : Natural;
182 Justify : Alignment := Left;
183 Pad : Wide_Character := Ada.Strings.Wide_Space);
185 --------------------------------------
186 -- Wide_String Selector Subprograms --
187 --------------------------------------
189 function Trim
190 (Source : Wide_String;
191 Side : Trim_End) return Wide_String;
193 procedure Trim
194 (Source : in out Wide_String;
195 Side : Trim_End;
196 Justify : Alignment := Left;
197 Pad : Wide_Character := Wide_Space);
199 function Trim
200 (Source : Wide_String;
201 Left : Wide_Maps.Wide_Character_Set;
202 Right : Wide_Maps.Wide_Character_Set) return Wide_String;
204 procedure Trim
205 (Source : in out Wide_String;
206 Left : Wide_Maps.Wide_Character_Set;
207 Right : Wide_Maps.Wide_Character_Set;
208 Justify : Alignment := Ada.Strings.Left;
209 Pad : Wide_Character := Ada.Strings.Wide_Space);
211 function Head
212 (Source : Wide_String;
213 Count : Natural;
214 Pad : Wide_Character := Ada.Strings.Wide_Space) return Wide_String;
216 procedure Head
217 (Source : in out Wide_String;
218 Count : Natural;
219 Justify : Alignment := Left;
220 Pad : Wide_Character := Ada.Strings.Wide_Space);
222 function Tail
223 (Source : Wide_String;
224 Count : Natural;
225 Pad : Wide_Character := Ada.Strings.Wide_Space) return Wide_String;
227 procedure Tail
228 (Source : in out Wide_String;
229 Count : Natural;
230 Justify : Alignment := Left;
231 Pad : Wide_Character := Ada.Strings.Wide_Space);
233 ---------------------------------------
234 -- Wide_String Constructor Functions --
235 ---------------------------------------
237 function "*"
238 (Left : Natural;
239 Right : Wide_Character) return Wide_String;
241 function "*"
242 (Left : Natural;
243 Right : Wide_String) return Wide_String;
245 end Ada.Strings.Wide_Fixed;