Ada.Strings.Unbounded.Text_IO is a GNAT implementation-defined package that offers Get_Line and Put_Line functions which work directly on unbounded strings. They are more efficient and easier to use than the standard Ada.Text_IO functions.
functionGet_Line (File : Ada.Text_IO.File_Type)
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.
procedurePut (U : Unbounded_String);
procedurePut (File : Ada.Text_IO.File_Type; U : Unbounded_String);
procedurePut_Line (U : Unbounded_String);
procedurePut_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.
See also edit
- Ada Programming
- Ada Programming/Libraries
- Ada Programming/Libraries/Ada
- Ada Programming/Libraries/Ada.Strings
- Ada Programming/Libraries/Ada.Strings.Unbounded
- Ada Programming/Libraries/Ada.Text_IO
- Ada Programming/Libraries/Ada.Text_IO.Unbounded_IO
- Ada Programming/Input Output
External examples edit
- Search for examples of
Ada.Strings.Unbounded.Text_IOin: Rosetta Code, GitHub (gists), any Alire crate or this Wikibook.
- Search for posts related to
Ada.Strings.Unbounded.Text_IOin: Stack Overflow, comp.lang.ada or any Ada related page.