pragma Elaborate_Body;
|
Known child units
|
Type Summary
String_Access |
Unbounded_String |
Primitive Operations: |
"&" ,
"&" ,
"&" ,
"&" ,
"&" ,
"*" ,
"*" ,
"*" ,
"<" ,
"<" ,
"<" ,
"<=" ,
"<=" ,
"<=" ,
"=" ,
"=" ,
"=" ,
">" ,
">" ,
">" ,
">=" ,
">=" ,
">=" ,
Append ,
Append ,
Append ,
Append ,
Append ,
Count ,
Count ,
Count ,
Count ,
Count ,
Delete ,
Delete ,
Element ,
Find ,
Find ,
Find ,
Find ,
Find ,
Find ,
Find_Token ,
Find_Token ,
Find_Token ,
First_Index ,
First_Index ,
First_Index ,
First_Index ,
First_Index ,
First_Index ,
From_Standard ,
From_Standard ,
From_String ,
Head ,
Head ,
Index ,
Index ,
Index ,
Index ,
Index ,
Index ,
Index ,
Index ,
Index ,
Index ,
Index_Non_Blank ,
Index_Non_Blank ,
Insert ,
Insert ,
Insert ,
Insert ,
Insert ,
Insert ,
Is_Prefix ,
Is_Prefix ,
Is_Suffix ,
Is_Suffix ,
Last_Index ,
Last_Index ,
Last_Index ,
Last_Index ,
Last_Index ,
Last_Index ,
Length ,
Occurrences ,
Occurrences ,
Overwrite ,
Overwrite ,
Overwrite ,
Overwrite ,
Overwrite ,
Overwrite ,
Replace ,
Replace ,
Replace_Element ,
Replace_Slice ,
Replace_Slice ,
Replace_Slice ,
Replace_Slice ,
Replace_Slice ,
Replace_Slice ,
Set ,
Slice ,
Slice ,
Slice ,
Tail ,
Tail ,
To_Standard ,
To_Standard ,
To_String ,
To_Unbounded_String ,
To_Unbounded_String ,
To_Unbounded_String ,
Translate ,
Translate ,
Translate ,
Translate ,
Translate ,
Translate ,
Translate ,
Translate ,
Trim ,
Trim ,
Trim ,
Trim
|
|
Constants and Named Numbers
|
Other Items:
|
|
function To_Standard
(S : in Unbounded_String)
return Ada.Strings.Unbounded.Unbounded_String;
|
Convert a Util.Text.Unbounded_String to a standard Unbounded_String .
Warning: Needs an intermediary copy of the string data.
|
|
function From_Standard
(S : in Ada.Strings.Unbounded.Unbounded_String)
return Unbounded_String;
|
Convert a standard Unbounded_String to a Util.Text.Unbounded_String .
Warning: Needs an intermediary copy of the string data.
|
|
procedure To_Standard
(Source : in Unbounded_String;
Target : out Ada.Strings.Unbounded.Unbounded_String);
|
Equivalent to Target := To_Standard (Source) .
|
|
procedure From_Standard
(Source : in Ada.Strings.Unbounded.Unbounded_String;
Target : out Unbounded_String);
|
Equivalent to Target := From_Standard (Source) .
|
|
|
|
|
|
|
|
procedure Append
(Source : in out Unbounded_String;
New_Item : in String);
|
Equivalent to Source := Source & New_Item .
|
|
procedure Append
(Source : in out Unbounded_String;
New_Item : in Character);
|
Equivalent to Source := Source & New_Item .
|
|
|
|
|
|
|
function Element
(Source : in Unbounded_String;
Index : in Positive)
return Character;
|
Equivalent to To_String (Source) (Index) . Raises
Ada.Strings.Index_Error if
Index > Length (Source) .
|
|
procedure Replace_Element
(Source : in out Unbounded_String;
Index : in Positive;
By : in Character);
|
Equivalent to To_String (Source) (Index) . Raises
Ada.Strings.Index_Error if
Index > Length (Source) .
|
|
function Slice
(Source : in Unbounded_String;
Low : in Positive;
High : in Natural)
return String;
|
Equivalent to To_String (Source) (Low .. High) . Raises
Ada.Strings.Index_Error if
High > Length (Source) .
|
|
function "="
(Left, Right : in Unbounded_String)
return Boolean;
|
Equivalent to To_String (Left) = To_String (Right) .
|
|
function "="
(Left : in Unbounded_String;
Right : in String)
return Boolean;
|
Equivalent to To_String (Left) = Right .
|
|
function "="
(Left : in String;
Right : in Unbounded_String)
return Boolean;
|
Equivalent to Left = To_String (Right) .
|
|
function "<"
(Left, Right : in Unbounded_String)
return Boolean;
|
Equivalent to To_String (Left) < To_String (Right) .
|
|
function "<"
(Left : in Unbounded_String;
Right : in String)
return Boolean;
|
Equivalent to To_String (Left) < Right .
|
|
function "<"
(Left : in String;
Right : in Unbounded_String)
return Boolean;
|
Equivalent to Left < To_String (Right) .
|
|
function "<="
(Left, Right : in Unbounded_String)
return Boolean;
|
Equivalent to To_String (Left) <= To_String (Right) .
|
|
function "<="
(Left : in Unbounded_String;
Right : in String)
return Boolean;
|
Equivalent to To_String (Left) <= Right .
|
|
function "<="
(Left : in String;
Right : in Unbounded_String)
return Boolean;
|
Equivalent to Left <= To_String (Right) .
|
|
function ">"
(Left, Right : in Unbounded_String)
return Boolean;
|
Equivalent to To_String (Left) > To_String (Right) .
|
|
function ">"
(Left : in Unbounded_String;
Right : in String)
return Boolean;
|
Equivalent to To_String (Left) > Right .
|
|
function ">"
(Left : in String;
Right : in Unbounded_String)
return Boolean;
|
Equivalent to Left > To_String (Right) .
|
|
function ">="
(Left, Right : in Unbounded_String)
return Boolean;
|
Equivalent to To_String (Left) >= To_String (Right) .
|
|
function ">="
(Left : in Unbounded_String;
Right : in String)
return Boolean;
|
Equivalent to To_String (Left) >= Right .
|
|
function ">="
(Left : in String;
Right : in Unbounded_String)
return Boolean;
|
Equivalent to Left >= To_String (Right) .
|
|
function Index
(Source : in Unbounded_String;
Pattern : in String;
Going : in Ada.Strings.Direction := Ada.Strings.Forward;
Mapping : in Ada.Strings.Maps.Character_Mapping :=
Ada.Strings.Maps.Identity)
return Natural;
|
Equivalent to
Ada.Strings.Unbounded.Index
(To_Standard (Source), Pattern, Going, Mapping);
|
|
function Index
(Source : in Unbounded_String;
Pattern : in String;
Going : in Ada.Strings.Direction := Ada.Strings.Forward;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function)
return Natural;
|
Equivalent to
Ada.Strings.Unbounded.Index
(To_Standard (Source), Pattern, Going, Mapping);
|
|
function Index
(Source : in Unbounded_String;
Set : in Ada.Strings.Maps.Character_Set;
Test : in Ada.Strings.Membership := Ada.Strings.Inside;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
Equivalent to
Ada.Strings.Unbounded.Index
(To_Standard (Source), Set, Test, Going);
|
|
function Index_Non_Blank
(Source : in Unbounded_String;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
Equivalent to
Ada.Strings.Unbounded.Index_Non_Blank
(To_Standard (Source), Going);
|
|
function Count
(Source : in Unbounded_String;
Pattern : in String;
Mapping : in Ada.Strings.Maps.Character_Mapping :=
Ada.Strings.Maps.Identity)
return Natural;
|
Equivalent to
Ada.Strings.Unbounded.Count
(To_Standard (Source), Pattern, Mapping);
|
|
function Count
(Source : in Unbounded_String;
Pattern : in String;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function)
return Natural;
|
Equivalent to
Ada.Strings.Unbounded.Count
(To_Standard (Source), Pattern, Mapping);
|
|
function Count
(Source : in Unbounded_String;
Set : in Ada.Strings.Maps.Character_Set)
return Natural;
|
Equivalent to
Ada.Strings.Unbounded.Count (To_Standard (Source), Set);
|
|
procedure Find_Token
(Source : in Unbounded_String;
Set : in Ada.Strings.Maps.Character_Set;
Test : in Ada.Strings.Membership;
First : out Positive;
Last : out Natural);
|
Equivalent to
Ada.Strings.Unbounded.Find_Token
(To_Standard (Source), Set, Test, First, Last);
|
|
function Translate
(Source : in Unbounded_String;
Mapping : in Ada.Strings.Maps.Character_Mapping)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Translate
(To_Standard (Source), Mapping));
|
|
procedure Translate
(Source : in out Unbounded_String;
Mapping : in Ada.Strings.Maps.Character_Mapping);
|
Equivalent to
Source := Translate (Source, Mapping);
|
|
function Translate
(Source : in Unbounded_String;
From : in Positive;
Through : in Natural;
Mapping : in Ada.Strings.Maps.Character_Mapping)
return Unbounded_String;
|
Equivalent to
Translate (Slice (Source, From, Through), Mapping);
|
|
procedure Translate
(Source : in out Unbounded_String;
From : in Positive;
Through : in Natural;
Mapping : in Ada.Strings.Maps.Character_Mapping);
|
Equivalent to
Translate (Slice (Source, From, Through), Mapping);
|
|
function Translate
(Source : in Unbounded_String;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Translate
(To_Standard (Source), Mapping));
|
|
procedure Translate
(Source : in out Unbounded_String;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function);
|
Equivalent to
Source := Translate (Source, Mapping);
|
|
function Translate
(Source : in Unbounded_String;
From : in Positive;
Through : in Natural;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function)
return Unbounded_String;
|
Equivalent to
Translate (Slice (Source, From, Through), Mapping);
|
|
procedure Translate
(Source : in out Unbounded_String;
From : in Positive;
Through : in Natural;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function);
|
Equivalent to
Translate (Slice (Source, From, Through), Mapping);
|
|
function Replace_Slice
(Source : in Unbounded_String;
Low : in Positive;
High : in Natural;
By : in String)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Replace_Slice
(To_Standard (Source), Low, High, By);
|
|
procedure Replace_Slice
(Source : in out Unbounded_String;
Low : in Positive;
High : in Natural;
By : in String);
|
Equivalent to
Source := Replace_Slice (Source, Low, High, By);
|
|
function Insert
(Source : in Unbounded_String;
Before : in Positive;
New_Item : in String)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Insert
(To_Standard (Source), Before, New_Item);
|
|
procedure Insert
(Source : in out Unbounded_String;
Before : in Positive;
New_Item : in String);
|
Equivalent to
Source := Insert (Source, Before, New_Item);
|
|
function Overwrite
(Source : in Unbounded_String;
Position : in Positive;
New_Item : in String)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Overwrite
(To_Standard (Source), Position, New_Item);
|
|
procedure Overwrite
(Source : in out Unbounded_String;
Position : in Positive;
New_Item : in String);
|
Equivalent to
Source := Overwrite (Source, Position, New_Item);
|
|
function Delete
(Source : in Unbounded_String;
From : in Positive;
Through : in Natural)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Delete
(To_Standard (Source), From, Through);
|
|
procedure Delete
(Source : in out Unbounded_String;
From : in Positive;
Through : in Natural);
|
Equivalent to
Source := Delete (Source, From, Through);
|
|
function Trim
(Source : in Unbounded_String;
Side : in Ada.Strings.Trim_End)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Trim
(To_Standard (Source), Side);
|
|
procedure Trim
(Source : in out Unbounded_String;
Side : in Ada.Strings.Trim_End);
|
Equivalent to
Source := Trim (Source, Side);
|
|
function Trim
(Source : in Unbounded_String;
Left : in Ada.Strings.Maps.Character_Set;
Right : in Ada.Strings.Maps.Character_Set)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Trim
(To_Standard (Source), Left, Right);
|
|
procedure Trim
(Source : in out Unbounded_String;
Left : in Ada.Strings.Maps.Character_Set;
Right : in Ada.Strings.Maps.Character_Set);
|
Equivalent to
Source := Trim (Source, Left, Right);
|
|
function Head
(Source : in Unbounded_String;
Count : in Natural;
Pad : in Character := Ada.Strings.Space)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Head
(To_Standard (Source), Count, Pad);
|
|
procedure Head
(Source : in out Unbounded_String;
Count : in Natural;
Pad : in Character := Ada.Strings.Space);
|
Equivalent to
Source := Head (Source, Count, Pad);
|
|
function Tail
(Source : in Unbounded_String;
Count : in Natural;
Pad : in Character := Ada.Strings.Space)
return Unbounded_String;
|
Equivalent to
From_Standard (Ada.Strings.Unbounded.Tail
(To_Standard (Source), Count, Pad);
|
|
procedure Tail
(Source : in out Unbounded_String;
Count : in Natural;
Pad : in Character := Ada.Strings.Space);
|
Equivalent to
Source := Tail (Source, Count, Pad);
|
|
function "*"
(Left : in Natural;
Right : in Character)
return Unbounded_String;
|
Returns an Unbounded_String of length Left with all characters
set to Right .
|
|
function "*"
(Left : in Natural;
Right : in String)
return Unbounded_String;
|
Returns an Unbounded_String whose content is obtained by concatenating
Right Left times.
|
|
function "*"
(Left : in Natural;
Right : in Unbounded_String)
return Unbounded_String;
|
Returns an Unbounded_String whose content is obtained by concatenating
Right 's string data Left times.
|
|
procedure Set
(Target : in out Unbounded_String;
Str : in String);
|
Equivalent to Target := To_Unbounded_String (Str); .
However, Set may be more efficient than To_Unbounded_String
because Target is passed by reference, and we thus can save
some finalizations.
|
|
|
function Slice
(Source : in Unbounded_String;
Low : in Positive;
High : in Natural)
return Unbounded_String;
|
Equivalent to
To_Unbounded_String (To_String (Source) (Low .. High)) .
Raises Ada.Strings.Index_Error if
High > Length (Source) .
|
|
|
function Find
(Source : in Unbounded_String;
Pattern : in Character;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
As Index , but not using any mappings. Equivalent to
Index (Source, Pattern, Going); .
|
|
function Find
(Source : in Unbounded_String;
Pattern : in String;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
As Index , but not using any mappings. Equivalent to
Index (Source, Pattern, Going); .
|
|
function Find
(Source : in Unbounded_String;
Pattern : in Unbounded_String;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
As Index , but not using any mappings. Equivalent to
Index (Source, To_String (Pattern), Going); .
|
|
function Find
(Source : in Unbounded_String;
Pattern : in Character;
From : in Positive;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
As Index , but not using any mappings. If
Going = Forward , equivalent to
Index (Slice (Source, From, Length (Source)), Pattern) ,
otherwise equivalent to
Index (Slice (Source, 1, From), Pattern, Backward)
|
|
function Find
(Source : in Unbounded_String;
Pattern : in String;
From : in Positive;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
As Index , but not using any mappings. If
Going = Forward , equivalent to
Index (Slice (Source, From, Length (Source)), Pattern) ,
otherwise equivalent to
Index (Slice (Source, 1, From), Pattern, Backward)
|
|
function Find
(Source : in Unbounded_String;
Pattern : in Unbounded_String;
From : in Positive;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
Equivalent to
Find (Source, To_String (Pattern), From, Going) .
|
|
function First_Index
(Source : in Unbounded_String;
Ch : in Character)
return Natural;
|
Returns the index of the first occurrence of Ch in Source , or
zero if Ch doesn't occur in Source .
|
|
function First_Index
(Source : in Unbounded_String;
Ch : in Character;
From : in Positive)
return Natural;
|
Returns the index of the first occurrence of Ch in
Slice (Source, From, Length (Source)) , or zero if Ch
doesn't occur in this slice of Source .
|
|
function Last_Index
(Source : in Unbounded_String;
Ch : in Character)
return Natural;
|
Returns the index of the last occurrence of Ch in Source , or zero
Ch doesn't occur in Source .
|
|
function Last_Index
(Source : in Unbounded_String;
Ch : in Character;
Limit : in Positive)
return Natural;
|
Equivalent to Last_Index (Slice (Source, 1, Limit), Ch) .
|
|
function First_Index
(Source : in Unbounded_String;
Pattern : in String)
return Natural;
|
Equivalent to
Ada.String.Fixed.Index (To_String (Source), Pattern);
|
|
function First_Index
(Source : in Unbounded_String;
Pattern : in String;
From : in Positive)
return Natural;
|
Equivalent to
Ada.String.Fixed.Index (Slice (Source, From, Length (Source)), Pattern);
|
|
function Last_Index
(Source : in Unbounded_String;
Pattern : in String)
return Natural;
|
Equivalent to
Ada.Strings.Fixed.Index (To_String (Source), Pattern, Backward);
|
|
function Last_Index
(Source : in Unbounded_String;
Pattern : in String;
Limit : in Positive)
return Natural;
|
Equivalent to
Last_Index (Slice (Source, 1, Limit), Pattern);
|
|
|
|
|
|
function Index
(Source : in Unbounded_String;
Pattern : in String;
From : in Positive;
Going : in Ada.Strings.Direction := Ada.Strings.Forward;
Mapping : in Ada.Strings.Maps.Character_Mapping :=
Ada.Strings.Maps.Identity)
return Natural;
|
If Going = Forward , equivalent to
Index (Slice (Source, From, Length (Source),
Pattern, Going, Mapping);
otherwise equivalent to
Index (Slice (Source, 1, From), Pattern, Going, Mapping);
|
|
function Index
(Source : in Unbounded_String;
Pattern : in String;
From : in Positive;
Going : in Ada.Strings.Direction := Ada.Strings.Forward;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function)
return Natural;
|
If Going = Forward , equivalent to
Index (Slice (Source, From, Length (Source),
Pattern, Going, Mapping);
otherwise equivalent to
Index (Slice (Source, 1, From), Pattern, Going, Mapping);
|
|
function Index
(Source : in Unbounded_String;
From : in Positive;
Set : in Ada.Strings.Maps.Character_Set;
Test : in Ada.Strings.Membership := Ada.Strings.Inside;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
If Going = Forward , equivalent to
Index (Slice (Source, From, Length (Source),
Set, Test, Going);
otherwise equivalent to
Index (Slice (Source, 1, From), Set, Test, Going);
|
|
function Index
(Source : in Unbounded_String;
Pattern : in Unbounded_String;
Going : in Ada.Strings.Direction := Ada.Strings.Forward;
Mapping : in Ada.Strings.Maps.Character_Mapping :=
Ada.Strings.Maps.Identity)
return Natural;
|
Equivalent to
Index (Source, To_String (Pattern), Going, Mapping);
|
|
function Index
(Source : in Unbounded_String;
Pattern : in Unbounded_String;
Going : in Ada.Strings.Direction := Ada.Strings.Forward;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function)
return Natural;
|
Equivalent to
Index (Source, To_String (Pattern), Going, Mapping);
|
|
function Index
(Source : in Unbounded_String;
Pattern : in Unbounded_String;
From : in Positive;
Going : in Ada.Strings.Direction := Ada.Strings.Forward;
Mapping : in Ada.Strings.Maps.Character_Mapping :=
Ada.Strings.Maps.Identity)
return Natural;
|
Equivalent to
Index (Source, To_String (Pattern), From, Going, Mapping);
|
|
function Index
(Source : in Unbounded_String;
Pattern : in Unbounded_String;
From : in Positive;
Going : in Ada.Strings.Direction := Ada.Strings.Forward;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function)
return Natural;
|
Equivalent to
Index (Source, To_String (Pattern), From, Going, Mapping);
|
|
function Index_Non_Blank
(Source : in Unbounded_String;
From : in Positive;
Going : in Ada.Strings.Direction := Ada.Strings.Forward)
return Natural;
|
If Going = Forward , equivalent to
Index_Non_Blank
(Slice (Source, From, Length (Source)), Going);
otherwise equivalent to
Index_Non_Blank (Slice (Source, 1, From), Going);
|
|
function Count
(Source : in Unbounded_String;
Pattern : in Unbounded_String;
Mapping : in Ada.Strings.Maps.Character_Mapping :=
Ada.Strings.Maps.Identity)
return Natural;
|
Equivalent to
Count (Source, To_String (Pattern), Mapping);
|
|
function Count
(Source : in Unbounded_String;
Pattern : in Unbounded_String;
Mapping : in Ada.Strings.Maps.Character_Mapping_Function)
return Natural;
|
Equivalent to
Count (Source, To_String (Pattern), Mapping);
|
|
function Occurrences
(Source : in Unbounded_String;
Pattern : in String)
return Natural;
|
Equivalent to Count (Source, Pattern) , but hard-wired not
to use any mapping.
|
|
|
procedure Find_Token
(Source : in Unbounded_String;
From : in Positive;
Set : in Ada.Strings.Maps.Character_Set;
Test : in Ada.Strings.Membership;
First : out Positive;
Last : out Natural);
|
Equivalent to
Find_Token (Slice (Source, From, Length (Source)),
Set, Test, First, Last) .
|
|
procedure Find_Token
(Source : in Unbounded_String;
Low : in Positive;
High : in Natural;
Set : in Ada.Strings.Maps.Character_Set;
Test : in Ada.Strings.Membership;
First : out Positive;
Last : out Natural);
|
Equivalent to
Find_Token (Slice (Source, Low, High),
Set, Test, First, Last) .
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Replace_Slice
(Source : in out Unbounded_String;
Low : in Positive;
High : in Natural;
By : in Unbounded_String;
From : in Positive;
To : in Natural);
|
Equivalent to
Replace_Slice (Source, Low, High, Slice (By, From, To));
|
|
|
|
|
procedure Insert
(Source : in out Unbounded_String;
Before : in Positive;
New_Item : in Unbounded_String;
Low : in Positive;
High : in Natural);
|
Equivalent to
Insert (Source, Before, Slice (New_Item, Low, High)); .
|
|
|
|
|
procedure Overwrite
(Source : in out Unbounded_String;
Position : in Positive;
New_Item : in Unbounded_String;
Low : in Positive;
High : in Natural);
|
Equivalent to
Overwrite (Source, Position, Slice (New_Item, Low, High)); .
|
|
|
|
|
private
|