Char.IsSeparator Method (Char)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Indicates whether the specified Unicode character is categorized as a separator character.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)


Public Shared Function IsSeparator ( _
    c As Char _
) As Boolean
public static bool IsSeparator(
    char c


Return Value

Type: System..::.Boolean
true if c is a separator character; otherwise, false.


The Unicode standard recognizes three subcategories of separators:


The Unicode standard classifies the characters \u000A (LF), \u000C (FF), and \u000A (CR) as control characters (members of the UnicodeCategory..::.Control category), not as separator characters.


The following example lists the Char objects that are classified as separator characters.

Module Example
   Public Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)
      For ctr As Integer = Convert.ToInt32(Char.MinValue) To Convert.ToInt32(Char.MaxValue)
         Dim ch As Char = ChrW(ctr)
         If Char.IsSeparator(ch) Then
            outputBlock.Text += String.Format("\u{0:X4} ({1})", AscW(ch), Char.GetUnicodeCategory(ch).ToString()) & vbCrLf
         End If
   End Sub
End Module
' The example displays the following output:
'       \u0020 (SpaceSeparator)
'       \u00A0 (SpaceSeparator)
'       \u1680 (SpaceSeparator)
'       \u180E (SpaceSeparator)
'       \u2000 (SpaceSeparator)
'       \u2001 (SpaceSeparator)
'       \u2002 (SpaceSeparator)
'       \u2003 (SpaceSeparator)
'       \u2004 (SpaceSeparator)
'       \u2005 (SpaceSeparator)
'       \u2006 (SpaceSeparator)
'       \u2007 (SpaceSeparator)
'       \u2008 (SpaceSeparator)
'       \u2009 (SpaceSeparator)
'       \u200A (SpaceSeparator)
'       \u2028 (LineSeparator)
'       \u2029 (ParagraphSeparator)
'       \u202F (SpaceSeparator)
'       \u205F (SpaceSeparator)
'       \u3000 (SpaceSeparator)
using System;

public class Example
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
      for (int ctr = Convert.ToInt32(Char.MinValue); ctr <= Convert.ToInt32(Char.MaxValue); ctr++)
         char ch = (Char)ctr;
         if (Char.IsSeparator(ch))
            outputBlock.Text += String.Format(@"\u{0:X4} ({1})", (int)ch, Char.GetUnicodeCategory(ch).ToString()) + "\n";
// The example displays the following output:
//       \u0020 (SpaceSeparator)
//       \u00A0 (SpaceSeparator)
//       \u1680 (SpaceSeparator)
//       \u180E (SpaceSeparator)
//       \u2000 (SpaceSeparator)
//       \u2001 (SpaceSeparator)
//       \u2002 (SpaceSeparator)
//       \u2003 (SpaceSeparator)
//       \u2004 (SpaceSeparator)
//       \u2005 (SpaceSeparator)
//       \u2006 (SpaceSeparator)
//       \u2007 (SpaceSeparator)
//       \u2008 (SpaceSeparator)
//       \u2009 (SpaceSeparator)
//       \u200A (SpaceSeparator)
//       \u2028 (LineSeparator)
//       \u2029 (ParagraphSeparator)
//       \u202F (SpaceSeparator)
//       \u205F (SpaceSeparator)
//       \u3000 (SpaceSeparator)

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0


Windows Phone

See Also


Char Structure

IsSeparator Overload

System Namespace