using System; class MainClass { public static void Main() { string str = "This is a test. $23"; int i; for(i=0; i < str.Length; i++) { Console.Write(str[i] + " is"); if(Char.IsSeparator(str[i])) Console.Write(" separator"); Console.WriteLine(); } } }
T is h is i is s is is separator i is s is is separator a is is separator t is e is s is t is . is is separator $ is 2 is 3 is