473,657 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8002
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.prin tln(result[x]);
prints the following output:

this
is
a
test
^ the .net version of that is pretty much identical to java
"Carlitos" <Ca******@discu ssions.microsof t.com> wrote in message
news:0A******** *************** ***********@mic rosoft.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******@discu ssions.microsof t.com> wrote in message
news:0A******** *************** ***********@mic rosoft.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
9870
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 ********************************** package Celcom.Client;
3
3797
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
3869
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 like outToClient.writeBytes("HTTP/1.0 200 Document Follows\r\n"). "outToClient.writeBytes" only write the message in the command prompt but not the browser.
0
2697
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 closed or null etc. Can anyone help? I am using SICStus prolog. Currently my prolog server looks like: :- write('starting'),nl. :- use_module(library(sockets)). :- use_module(library(prologbeans)). :- use_module(library(charsio)).
7
11065
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, need to iterate through pages page2 - e.g. allow user to update the fields there) On page1 I have a bunch of checkboxes with the same name v1 but different values (= DB rowId).
1
3125
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 part just explains a check digit.. i think this part in my program is alright These barcodes actually have four parts: a tall line as the first bar, a series of tall and short lines corresponding to the digits in the ZIP code, a check digit,...
0
3129
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 url,first it will ask for authentication.After giving username and password,the authentication will be confirmed and if the site has access right as allow,the website will open else a page will be displayed.There we can send request mail to the...
20
3010
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 file is to be read into my java program and then inserted (from the program into an Access Database). I am not exactly sure of where the problem lies. I know it has something to do with how I am parsing the file, or how I am passing my arguments to...
4
16706
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 CsvTest.readFile(CsvTest.java:26) at Trial.main(Trial.java:24) I have no idea what to change here because I don't know what is wrong..please help me out... import java.io.*; import java.util.*;
0
8411
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8613
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.