All pastes #461784 Raw Edit

Miscellany

public text v1 · immutable
#461784 ·published 2007-04-27 21:37 UTC
rendered paste body
    -----
    -- Get Next Parameter
    --
    -- This is used to parse out the next parameter in the parameter list.
    --
    -- @access Private
    -----
    Function Get_Next_Parameter (Parameter_List : String; Index : Integer) Return String is

      Current : Integer := Index;
      Result : Ada.Strings.Unbounded.Unbounded_String := nus;

    Begin

      If Current /= Parameter_List'Last Then

        While Parameter_List(Current) /= ',' Loop

          Ada.Strings.Unbounded.Append(Result, Parameter_List(Current));
          Exit When Current = Parameter_List'Last;
          Current := Current + 1;

        End Loop;

      End If;

      Return Ada.Strings.Unbounded.To_String(Result);

    End Get_Next_Parameter;
    Pragma Inline (Get_Next_Parameter);