lace.text: Add an 'Element' function.
This commit is contained in:
@@ -155,6 +155,19 @@ is
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function Element (Self : in Item; Index : in Positive) return Character
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
if Index > Self.Length
|
||||||
|
then
|
||||||
|
raise Error with "Index" & Index'Image & " exceeds length of" & Self.Length'Image;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
return Self.Data (Index);
|
||||||
|
end Element;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure append (Self : in out Item; Extra : in String)
|
procedure append (Self : in out Item; Extra : in String)
|
||||||
is
|
is
|
||||||
First : constant Positive := Self.Length + 1;
|
First : constant Positive := Self.Length + 1;
|
||||||
|
|||||||
@@ -124,6 +124,9 @@ is
|
|||||||
function mono_Spaced (Self : in Item) return Item;
|
function mono_Spaced (Self : in Item) return Item;
|
||||||
|
|
||||||
|
|
||||||
|
function Element (Self : in Item; Index : in Positive) return Character;
|
||||||
|
|
||||||
|
|
||||||
procedure append (Self : in out Item; Extra : in String);
|
procedure append (Self : in out Item; Extra : in String);
|
||||||
--
|
--
|
||||||
-- Raises an Error if capacity is exceeded.
|
-- Raises an Error if capacity is exceeded.
|
||||||
|
|||||||
Reference in New Issue
Block a user