public static List <Data> Parse(string script, string operatorKeyword = "=", char[] trimChars = null, char[] separators = null) { if (null == separators) { separators = SimpleScriptParser.DEFAULT_SEPARATORS; } return(SimpleScriptParser.Parse(script.Split(separators, StringSplitOptions.RemoveEmptyEntries), operatorKeyword, trimChars)); }
public static List <Data> Parse(string[] lines, string operatorKeyword = "=", char[] trimChars = null) { List <Data> datas = new List <Data>(lines.Length); Data data; for (int n = 0; n < lines.Length; ++n) { if (SimpleScriptParser.TryParseLine(lines[n], out data, operatorKeyword, trimChars)) { datas.Add(data); } } return(datas); }