How to tokenize the string base on \t\n\r\f

P

puzzlecracker

which is defult in Java's StringTokenizer class. I was tryig to use
Split to no avail .

public Foo(string s)
{
string tokens=s.Split("\t\n\r\f")

}

thanks
 
A

Arne Vajhøj

puzzlecracker said:
which is defult in Java's StringTokenizer class. I was tryig to use
Split to no avail .

public Foo(string s)
{
string tokens=s.Split("\t\n\r\f")

}

Try:

string[] tokens = s.Split("\t\n\r\f".ToCharArray());

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top