public void CheckCharDelimiterComaExpected()
        {
            var        parserdelimiter = new ParserDelimiter("col1,col2,col3");
            var        chardelimiter   = parserdelimiter.GetBestCharDelimiter();
            const char expected        = ',';

            Assert.AreEqual(chardelimiter, expected);
        }
Example #2
0
        public void CheckHeaderCredicoop()
        {
            var        parserdelimiter = new ParserDelimiter(File.ReadAllLines(CsvCredicoop).FirstOrDefault());
            var        chardelimiter   = parserdelimiter.GetBestCharDelimiter();
            const char expected        = ',';

            Assert.AreEqual(chardelimiter, expected);
        }
        public static char BestSeparator(this string str)
        {
            var parserdelimiter = new ParserDelimiter(str);

            return(parserdelimiter.GetBestCharDelimiter());
        }