Exemplo n.º 1
0
        public void SetVariable(string name, CommandArg value)
        {
            name = name.ToLower();

            if (variables.ContainsKey(name))
            {
                variables[name] = value;
            }
            else
            {
                variables.Add(name, value);
            }
        }
Exemplo n.º 2
0
        CommandArg EatArgument(ref string s)
        {
            var arg         = new CommandArg();
            int space_index = s.IndexOf(' ');

            if (space_index >= 0)
            {
                arg.String = s.Substring(0, space_index);
                s          = s.Substring(space_index + 1);        // Remaining
            }
            else
            {
                arg.String = s;
                s          = "";
            }

            return(arg);
        }