AdaCL.Wide_Strings

More...

Entities

Simple types

Hex_Digit

Subprograms

Append_All
Append_All
Append_First
Append_First
Append_Last
Append_Last
Change_All
Change_All
Change_First
Change_First
Change_Last
Change_Last
Field_End
First_Word
Hash
Hash
Hash
Hash
Insert_All
Insert_All
Insert_First
Insert_First
Insert_Last
Insert_Last
Last_Word
Value

Description

No, I have not created some new Wide_String class - yet. Just a few string tools.

Hex_Digit [source]

34 subtype Hex_Digit is Natural range 0 .. 16#F#;

Append_All [source]

128 procedure Append_All
129 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
130 Search : in Wide_String;
131 New_Item : in Wide_String;
132 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity);

Searches for all occurences of text "Search" and Inserts text "Insert" after the found text but only when "Insert" is not allready there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Append_All [source]

143 procedure Append_All
144 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
145 Search : in Wide_String;
146 New_Item : in Wide_String;
147 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity;
148 Count : out Natural);

Searches for all occurences of text "Search" and Inserts text "Insert" after the found text but only when "Insert" is not allready there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Count of type Natural

Count of replaces done

Append_First [source]

158 procedure Append_First
159 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
160 Search : in Wide_String;
161 New_Item : in Wide_String;
162 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity);

Searches for first occurence of text "Search" and Inserts text "Insert" after the found text but only when "Insert" is not allready there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Append_First [source]

173 procedure Append_First
174 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
175 Search : in Wide_String;
176 New_Item : in Wide_String;
177 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity;
178 Found : out Boolean);

Searches for first occurence of text "Search" and Inserts text "Insert" after the found text but only when "Insert" is not allready there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Found of type Boolean

Count of replaces done

Append_Last [source]

188 procedure Append_Last
189 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
190 Search : in Wide_String;
191 New_Item : in Wide_String;
192 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity);

Searches for last occurence of text "Search" and Inserts text "Insert" after the found text but only when "Insert" is not allready there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Append_Last [source]

203 procedure Append_Last
204 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
205 Search : in Wide_String;
206 New_Item : in Wide_String;
207 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity;
208 Found : out Boolean);

Searches for last occurence of text "Search" and Inserts text "Insert" after the found text but only when "Insert" is not allready there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Found of type Boolean

Count of replaces done

Change_All [source]

43 procedure Change_All
44 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
45 Search : in Wide_String;
46 Replace : in Wide_String;
47 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity);

Replace all Search with Replace

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

Replace of type Wide_String

String we want to have

Mapping of type Wide_Character_Mapping

Search mapping

Change_All [source]

57 procedure Change_All
58 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
59 Search : in Wide_String;
60 Replace : in Wide_String;
61 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity;
62 Count : out Natural);

Replace all Search with Replace and Count how often it was done.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

Replace of type Wide_String

String we want to have

Mapping of type Wide_Character_Mapping

Search mapping

Count of type Natural

Count of replaces done

Change_First [source]

71 procedure Change_First
72 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
73 Search : in Wide_String;
74 Replace : in Wide_String;
75 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity);

Replace all Search with Replace

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

Replace of type Wide_String

String we want to have

Mapping of type Wide_Character_Mapping

Search mapping

Change_First [source]

85 procedure Change_First
86 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
87 Search : in Wide_String;
88 Replace : in Wide_String;
89 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity;
90 Found : out Boolean);

Replace First Search with Replace and return success flag.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

Replace of type Wide_String

String we want to have

Mapping of type Wide_Character_Mapping

Search mapping

Found of type Boolean

Count of replaces done

Change_Last [source]

99 procedure Change_Last
100 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
101 Search : in Wide_String;
102 Replace : in Wide_String;
103 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity);

Replace Last Search with Replace

Source of type Unbounded_Wide_String

: String we look for

Search of type Wide_String

: String to be changed

Replace of type Wide_String

: String we want to have

Mapping of type Wide_Character_Mapping

: Search mapping

Change_Last [source]

113 procedure Change_Last
114 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
115 Search : in Wide_String;
116 Replace : in Wide_String;
117 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity;
118 Found : out Boolean);

Replace Last Search with Replace and return success flag.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

Replace of type Wide_String

String we want to have

Mapping of type Wide_Character_Mapping

Search mapping

Found of type Boolean

Count of replaces done

Field_End [source]

216 function Field_End
217 (Source : in Wide_String;
218 Field_Separator : in Wide_Character;
219 Starting_At : Positive)
220 return Natural with
221 Pure_Function;

Return the end-of-field position in Data after "Starting_Index", assuming that fields are separated by the Field_Separator. If there's no Field_Separator, return the end of the Data.

Source of type Wide_String

String to search in

Field_Separator of type Wide_Character

Field seperator.

Starting_At of type Positive

Start search at.

Return value

First_Word [source]

356 function First_Word
357 (Source : in Wide_String;
358 Delimiter : in Wide_Character := ' ')
359 return Wide_String with
360 Pure_Function;

Extract the first word.

Source of type Wide_String

String to search

Delimiter of type Wide_Character

word delimiter. Default is space.

Return value

Hash [source]

314 function Hash (Key : Wide_String) return Natural with
315 Pure_Function;

Hash function for booch components.

Key of type Wide_String

String to calculate a hash value form

Return value

hash value

Hash [source]

322 function Hash (Key : Ada.Strings.Wide_Unbounded.Unbounded_Wide_String) return Natural with
323 Pure_Function;

Hash function for booch components.

Key of type Unbounded_Wide_String

String to calculate a hash value form

Return value

hash value

Hash [source]

330 function Hash (Key : Ada.Strings.Wide_Unbounded.Unbounded_Wide_String) return Ada.Containers.Hash_Type with
331 Pure_Function;

Hash function for Ada components.

Key of type Unbounded_Wide_String

String to calculate a hash value form

Return value

hash value

Hash [source]

338 function Hash (Key : Wide_String) return Ada.Containers.Hash_Type with
339 Pure_Function;

Hash function for Ada components.

Key of type Wide_String

String to calculate a hash value form

Return value

hash value

Insert_All [source]

258 procedure Insert_All
259 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
260 Search : in Wide_String;
261 New_Item : in Wide_String;
262 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity);

Searches for all occurences of text "Search" and Inserts text "Insert" bevore when "Insert" is there.

Source of type Unbounded_Wide_String

Search mapping

Search of type Wide_String

String we want to insert

New_Item of type Wide_String

String we look for

Mapping of type Wide_Character_Mapping

String to be changed

Insert_All [source]

272 procedure Insert_All
273 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
274 Search : in Wide_String;
275 New_Item : in Wide_String;
276 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity;
277 Count : out Natural);

Searches for all occurences of text "Search" and Inserts text "Insert" bevore when "Insert" is there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Count of type Natural

Count of replaces done

Insert_First [source]

230 procedure Insert_First
231 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
232 Search : in Wide_String;
233 New_Item : in Wide_String;
234 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity);

Searches for first occurence of text "Search" and Inserts text "Insert" bevore when "Insert" is there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Insert_First [source]

244 procedure Insert_First
245 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
246 Search : in Wide_String;
247 New_Item : in Wide_String;
248 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity;
249 Found : out Boolean);

Searches for first occurence of text "Search" and Inserts text "Insert" bevore when "Insert" is there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Found of type Boolean

Count of replaces done

Insert_Last [source]

286 procedure Insert_Last
287 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
288 Search : in Wide_String;
289 New_Item : in Wide_String;
290 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity);

Searches for last occurence of text "Search" and Inserts text "Insert" bevore when "Insert" is there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Insert_Last [source]

300 procedure Insert_Last
301 (Source : in out Ada.Strings.Wide_Unbounded.Unbounded_Wide_String;
302 Search : in Wide_String;
303 New_Item : in Wide_String;
304 Mapping : in Ada.Strings.Wide_Maps.Wide_Character_Mapping := Ada.Strings.Wide_Maps.Identity;
305 Found : out Boolean);

Searches for last occurence of text "Search" and Inserts text "Insert" bevore when "Insert" is there.

Source of type Unbounded_Wide_String

String to be changed

Search of type Wide_String

String we look for

New_Item of type Wide_String

String we want to insert

Mapping of type Wide_Character_Mapping

Search mapping

Found of type Boolean

Count of replaces done

Last_Word [source]

367 function Last_Word
368 (Source : in Wide_String;
369 Delimiter : in Wide_Character := ' ')
370 return Wide_String with
371 Pure_Function;

Extract the last word.

Source of type Wide_String

String to search

Delimiter of type Wide_Character

word delimiter. Default is space.

Return value

Value [source]

346 function Value (Image : Ada.Strings.Wide_Unbounded.Unbounded_Wide_String) return Integer with
347 Pure_Function;

convert Wide_String into Integer

Image of type Unbounded_Wide_String

String to to be shown as Integer

Return value

pased integer value