public void SetVariable(string name, CommandArg value) { name = name.ToUpper(); if (variables.ContainsKey(name)) { variables[name] = value; } else { variables.Add(name, value); } }
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); }