Package: Ada.Strings.Unbounded.Text_IO


with Ada.Text_IO;


This child package of Ada.Strings.Unbounded provides some specialized Text_IO routines that work directly with unbounded strings, avoiding the inefficiencies of access via the standard interface, and also taking direct advantage of the variable length semantics of these strings.


package Ada.Strings.Unbounded.Text_IO is

Other Items:

function Get_Line                                return Unbounded_String;

function Get_Line (File : Ada.Text_IO.File_Type) return Unbounded_String;
Reads up to the end of the current line, returning the result as an unbounded string of appropriate length. If no File parameter is present, input is from Current_Input.

procedure Put                                    (U : Unbounded_String);

procedure Put      (File : Ada.Text_IO.File_Type; U : Unbounded_String);

procedure Put_Line                               (U : Unbounded_String);

procedure Put_Line (File : Ada.Text_IO.File_Type; U : Unbounded_String);
These are equivalent to the standard Text_IO routines passed the value To_String (U), but operate more efficiently, because the extra copy of the argument is avoided.
end Ada.Strings.Unbounded.Text_IO;