Microsoft.CodeAnalysis.Sarif.Extensions.IsNewline C# (CSharp) Method

IsNewline() static private method

Checks if a character is a newline.
static private IsNewline ( char testedCharacter ) : bool
testedCharacter char The character to check.
return bool
        internal static bool IsNewline(char testedCharacter)
        {
            return testedCharacter == '\r'
                || testedCharacter == '\n'
                || testedCharacter == '\u2028'  // Unicode line separator
                || testedCharacter == '\u2029'; // Unicode paragraph separator
        }

Usage Example

 public void Extensions_IsNewline_Other()
 {
     Assert.IsFalse(Extensions.IsNewline('E'));
 }
All Usage Examples Of Microsoft.CodeAnalysis.Sarif.Extensions::IsNewline