473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Java's StringTokenizer is *what* in .NET?

Hi there,

What would be the counterpart for Java's StringTokenizer class in .NET?

In fact, does anybody know a good web site that gives this kind of
information, like a Java-.NET/.NET-Java dictionary or equivalency table?

Many thanks,

--
Carlitos
Nov 16 '05 #1
5 7989
I guess the closest thing is the Regex class.

This sites claims to have a StringTokenizer in C#. I have not looked at
that myself though.

http://www.c-sharpcorner.com/Code/20...gTokenizer.asp

/Joakim

Carlitos wrote:
Hi there,

What would be the counterpart for Java's StringTokenizer class in .NET?

In fact, does anybody know a good web site that gives this kind of
information, like a Java-.NET/.NET-Java dictionary or equivalency table?

Many thanks,

Nov 16 '05 #2
Use the Split() method on the string object...

i.e. :

string[] strings = myString.Split(new char[] { ';' });
Nov 16 '05 #3
from http://java.sun.com/j2se/1.4.2/docs/...okenizer.html:

StringTokenizer is a legacy class that is retained for compatibility reasons
although its use is discouraged in new code. It is recommended that anyone
seeking this functionality use the split method of String or the
java.util.regex package instead.
The following example illustrates how the String.split method can be used to
break up a string into its basic tokens:

String[] result = "this is a test".split("\\s");
for (int x=0; x<result.length; x++)
System.out.println(result[x]);
prints the following output:

this
is
a
test
^ the .net version of that is pretty much identical to java
"Carlitos" <Ca******@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
Hi there,

What would be the counterpart for Java's StringTokenizer class in .NET?

In fact, does anybody know a good web site that gives this kind of
information, like a Java-.NET/.NET-Java dictionary or equivalency table?

Many thanks,

--
Carlitos

Nov 16 '05 #4
http://spaces.msn.com/members/staceyw/ for a regex example to split a string
on one or more whitespace chars into fields.

--
William Stacey, MVP
http://mvp.support.microsoft.com

"Carlitos" <Ca******@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
Hi there,

What would be the counterpart for Java's StringTokenizer class in .NET?

In fact, does anybody know a good web site that gives this kind of
information, like a Java-.NET/.NET-Java dictionary or equivalency table?

Many thanks,

--
Carlitos


Nov 16 '05 #5
Many Thanks to everyone who answered my question.

C

"Carlitos" wrote:
Hi there,

What would be the counterpart for Java's StringTokenizer class in .NET?

In fact, does anybody know a good web site that gives this kind of
information, like a Java-.NET/.NET-Java dictionary or equivalency table?

Many thanks,

--
Carlitos

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
3
by: - Steve - | last post by:
It doesn't appear that Visual Studio 2003 has the StringTokenizer class for a J# project. Am I missing something? Steve
5
by: kaiwing18 | last post by:
Hi, I have a simple java server program, i want to ask how can i output a simple HTML page of error message, without calling a html file. That means i want to type HTML codes in the program...
0
by: Dominique | last post by:
I am trying to communicate to a prolog server from a java client, however even though the connection is successfully made every time I try to perform QueryExecute I get an error, either Socket...
7
by: Oleg Konovalov | last post by:
Hi, I am trying to pass a bunch of checked checkboxes (Javascript array) from page1 to the Java action class on subsequent web page (page2). (on page 1 I have a bunch of DB rows with a checkbox,...
1
by: Unebrion | last post by:
Alright im working on a program that prints out user imput in a frame, along with a barcode.. it is like the front of an envelope. Here is the description for the program. This...
0
by: VeeraLakshmi | last post by:
I am doing a project for internet control using Java,PHP and MySql.All sites should go through the proxy server only.We are giving access rights as allow or deny to the sites.If we type the...
20
by: dav3 | last post by:
Alright folks I am in need of a lil guidance/assistance here. I have a program which reads in a txt file. This txt file contains lines of the form January 3, 2007, 85.8 Now each line of the txt...
4
by: HaifaCarina | last post by:
here's the complete lines of errors.. Exception in thread "main" java.util.NoSuchElementException at java.util.StringTokenizer.nextToken(StringTokenizer.java:332) at...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.