Is New Line Character - CSharp System

CSharp examples for System:Char

Description

Is New Line Character

Demo Code

// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.

public class Main{
        internal static bool IsNewLine(char c)
        {/*from w w  w  .j  a  v  a2  s  .  com*/
            return c == 0x000d // Carriage return
                   || c == 0x000a // Linefeed
                   || c == 0x2028 // Line separator
                   || c == 0x2029; // Paragraph separator
        }
}

Related Tutorials