Landis.Extension.DynamicFire.CSVParser.BreakCSV C# (CSharp) Method

BreakCSV() protected method

protected BreakCSV ( string source ) : string[]
source string
return string[]
        protected string[] BreakCSV(string source)
        {//Use regex to break CSV at delimiters
            MatchCollection matches = CSVregEx.Matches(source);

            string[] res = new string[matches.Count];
            int i = 0;
            foreach (Match m in matches)
            {
                res[i] = m.Groups[0].Value.TrimEnd(delimiter[0]).Trim(quotes[0]);
                i++;
            }
            return res;
        }