How do I create a C-style nul-terminated string?
In a declaration block, append an ASCII.NUL to create a constant Ada string. declare Str_Nul : constant String := Str & ASCII.NUL; begin Call_Requiring_C_String (Str_Nul (Str_Nul’First)’Address); end; — or — function Nul_Terminate (Str : String) return String is Str_Nul : constant String := Str & ASCII.