Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# String splitter? (equivalent to Java's StringTokenizer)

Status
Not open for further replies.

natwod

Programmer
Nov 21, 2002
41
US
Hey, does anybody know if C# has an equivalent to the class "StringTokenizer" (Java)?

I would like to split a string into "words" using spaces as enumerators, but I want it to ignore multiple spaces in a row.

Any suggestions?

Thanx
natwod

 
The String class has a Split method, to which you can pass an array of delimiter characters.

Don't know what it will do when it encounters multiple delimiters in a row, sorry.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top