Unbounded_String is probably the easiest way:
with Ada.Strings.Unbounded;
use Ada.Strings.unbounded;
...
Temp_Unbounded_String : Unbounded_String;
...
for I in 1 .. Collection.Size loop
Append(Temp_Unbounded_String, ToString(Collection.Book(I));
end loop;
If you need the result to be placed on a standard fixed-length string:
declare
Temp_String : constant String := To_String(Temp_Unbounded_String);
begin
Combined_String(Temp_String'Range) := Temp_String;
end;
Alternatively, you can use the Ada.Strings.Fixed Move () procedure to cast an Unbounded_String to a fixed-length string:
Ada.Strings.Fixed.Move(To_String(Temp_Unbounded_String), Combined_String);
, " ", Length_Error. Move(), , . .