Vector of strings and operations on it.
function "="
(Left : Virtual_String_Vector;
Right : Virtual_String_Vector) return Boolean
Compare two string vectors.
procedure Append
(Self : in out Virtual_String_Vector'Class;
Item : Virtual_String_Vector'Class)
Append strings of Item to the end of the vector.
procedure Append
(Self : in out Virtual_String_Vector'Class;
Item : VSS.Strings.Virtual_String'Class)
Append string to the end of the vector.
procedure Append_Syntax_Sugar
(Self : in out Virtual_String_Vector;
Item : VSS.Strings.Virtual_String)
Append operation to match expected profile of Aggregate aspect.
procedure Clear (Self : in out Virtual_String_Vector'Class)
Remove all strings from the vector
function Contains
(Self : Virtual_String_Vector'Class;
Item : VSS.Strings.Virtual_String;
Case_Sensitivity : VSS.Strings.Case_Sensitivity :=
VSS.Strings.Case_Sensitive)
return Boolean
Return True when vector contains given string.
type Cursor is private;
procedure Delete
(Self : in out Virtual_String_Vector'Class;
Index : Positive)
Delete element at the given index.
function Delete_First
(Self : Virtual_String_Vector'Class) return Virtual_String_Vector
Delete first element and return result vector.
procedure Delete_First (Self : in out Virtual_String_Vector'Class)
Delete first element from the vector.
procedure Delete_Last (Self : in out Virtual_String_Vector'Class)
Delete the last element.
function Element
(Self : Virtual_String_Vector'Class;
Index : Positive) return VSS.Strings.Virtual_String
Return given element. Return "null" string when index is out of bound.
function Element
(Self : Virtual_String_Vector'Class;
Position : Cursor) return VSS.Strings.Virtual_String
Empty_Virtual_String_Vector : constant Virtual_String_Vector;
function First (Self : Reversible_Iterator) return Cursor
function First_Element
(Self : Virtual_String_Vector'Class) return VSS.Strings.Virtual_String
Return first element of the vector.
function Has_Element (Self : Cursor) return Boolean
function Is_Empty (Self : Virtual_String_Vector'Class) return Boolean
Return True when string vector is empty.
function Iterate
(Self : Virtual_String_Vector'Class) return Reversible_Iterator
Return an iterator over each element in the vector
package Iterator_Interfaces is new Ada.Iterator_Interfaces
(Cursor, Has_Element);
function Join
(Self : Virtual_String_Vector'Class;
Separator : VSS.Characters.Virtual_Character)
return VSS.Strings.Virtual_String
Join all strings in the string vector into single string with each element separated by the given separator.
function Join_Lines
(Self : Virtual_String_Vector'Class;
Terminator : VSS.Strings.Line_Terminator;
Terminate_Last : Boolean := True)
return VSS.Strings.Virtual_String
Join all string vector's strings with each element separated by given Terminator. When Terminate_Last is True line terminator is added after last line.
function Last (Self : Reversible_Iterator) return Cursor
function Last_Element
(Self : Virtual_String_Vector'Class) return VSS.Strings.Virtual_String
Return last element of the vector.
function Length (Self : Virtual_String_Vector'Class) return Natural
Number of elements in the vector.
function Next
(Self : Reversible_Iterator;
Position : Cursor) return Cursor
procedure Prepend
(Self : in out Virtual_String_Vector'Class;
Item : VSS.Strings.Virtual_String'Class)
Insert given string before existing strings in the vector.
function Previous
(Self : Reversible_Iterator;
Position : Cursor) return Cursor
procedure Replace
(Self : in out Virtual_String_Vector'Class;
Index : Positive;
Item : VSS.Strings.Virtual_String'Class)
Replace a string vector item with given Index by a new value.
type Reversible_Iterator is
limited new Iterator_Interfaces.Reversible_Iterator with private;
type Virtual_String_Vector is tagged private
with
Constant_Indexing => Element,
Default_Iterator => Iterate,
Iterator_Element => VSS.Strings.Virtual_String,
Aggregate => (Empty => Empty_Virtual_String_Vector,
Add_Unnamed => Append_Syntax_Sugar),
Preelaborable_Initialization;