Is Line Terminator - CSharp System

CSharp examples for System:Char

Description

Is Line Terminator

Demo Code

// Permission is hereby granted, free of charge, to any person obtaining a copy

public class Main{
        public static bool IsLineTerminator(this char c)
        {//w  w w . j av  a  2  s.  com
            switch (c)
            {
                case '\xD':
                case '\xA':
                case '\x2028':
                case '\x2029':
                    return true;

                default:
                    return false;
            }
        }
}

Related Tutorials