Hosted by
|
with Ada.Unchecked_Deallocation;
with Integer_Strings; use Integer_Strings;
with Interfaces; use Interfaces;
package body Strings is
String_Count : Integer := 0;
Byte_Count : Integer := 0;
procedure To_String_Access
(This : in String;
Result : in out String_Access) is
begin
Free(Result);
Result := new String'(This);
String_Count := String_Count + 1;
Byte_Count := Byte_Count + This'Length;
end To_String_Access;
pragma Inline(To_String_Access);
function To_String_Access
(This : in String)
return String_Access
is
Result : String_Access;
begin
To_String_Access(This, Result);
return Result;
end To_String_Access;
|