with Ada.Containers; with Ada.Text_IO; package body Config is procedure Get_Key_Value (S : in String; key, value : out String_U.Unbounded_String) is Index : Natural; begin Index := String_F.Index (S, "="); if (Index = 0) then key := String_U.To_Unbounded_String (S); value := String_U.To_Unbounded_String (""); else key := String_U.To_Unbounded_String (S (S'First .. Index - 1)); value := String_U.To_Unbounded_String (S (Index + 1 .. S'Last)); end if; end Get_Key_Value; procedure Add_Param (Cfg : in out Config.Config_Maps.Map; Arg : in String) is key, value : String_U.Unbounded_String; begin Get_Key_Value (Arg, key, value); Ada.Text_IO.Put_Line ("key" & String_U.To_String (key)); Config.Config_Maps.Insert (Container => Cfg, Key => key, New_Item => value); end Add_Param; end Config;