diff options
| author | Jedidiah Barber <contact@jedbarber.id.au> | 2025-11-16 21:35:17 +1300 |
|---|---|---|
| committer | Jedidiah Barber <contact@jedbarber.id.au> | 2025-11-16 21:35:17 +1300 |
| commit | d0f8cc922207cd066a7a44aa3fa24fcd9158bbd0 (patch) | |
| tree | 134cc05a85a41e2e83725311cc5efc461422854e /src/kompsos-pretty_print.adb | |
| parent | 203222f4ffbdaf23a30ab390a7ad765cfef0c008 (diff) | |
Improvements to Fresh and Take
Diffstat (limited to 'src/kompsos-pretty_print.adb')
| -rw-r--r-- | src/kompsos-pretty_print.adb | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/kompsos-pretty_print.adb b/src/kompsos-pretty_print.adb index 772c0cd..73cee40 100644 --- a/src/kompsos-pretty_print.adb +++ b/src/kompsos-pretty_print.adb @@ -29,8 +29,6 @@ package body Kompsos.Pretty_Print is end Image; - - function Image (Item : in ID_Number) return String is @@ -135,6 +133,23 @@ package body Kompsos.Pretty_Print is end Image; + function Image + (Items : in State_Array) + return String + is + Result : SU.Unbounded_String; + begin + if Items'Length = 0 then + return "States: N/A" & Latin.LF; + end if; + for Index in Items'Range loop + SU.Append (Result, "State#" & Image (Index) & ":" & Latin.LF); + SU.Append (Result, Image (Items (Index))); + end loop; + return SU.Slice (Result, 1, SU.Length (Result) - 1); + end Image; + + function Image |
