Exemple #1
0
        static public string LineEnd(eol mode, Encoding enc)
        {
            switch (mode)
            {
            case eol.Cr: return(getStr(Cr, enc));

            case eol.Lf: return(getStr(Lf, enc));

            case eol.CrLf: return(getStr(CrLf, enc));

            case eol.AddSpace: return(" ");

            case eol.CommaDelimit: return(",");

            case eol.Ignore: return(string.Empty);
            }
            return(null);
        }
Exemple #2
0
        static public string FromStrArray(eol emode, params string[] input)
        {
            if (input == null)
            {
                return(null);
            }
            if (input.Length == 0)
            {
                return(null);
            }
            string ret = "", endl = LineEnd(emode);

            foreach (string str in input)
            {
                ret += str + endl;
            }
            endl = null; return(ret);
        }
Exemple #3
0
 static public string LineEnd(eol mode)
 {
     return(LineEnd(mode, DefaultEncoding));
 }