Results 1 to 3 of 3
- 12-03-2008, 12:09 AM #1
[SOLVED] Questions about StringTokenizer
So I'm looking at this StringTokenizer and I understand how it works when you just put in a String. It gives you what's between the white space. But there's something else you can do with it. You can use delimiters which is where I'm a little confused on how to create this tokenizer. What I want to do is get the tokens from a String such as:
String s = "It's a nice day, don't you think?";
It s a nice day don t you think
So basically the tokenizer not only skips the white space, it skips punctuation marks as well, which you send in to the tokenizer. How can I do that?
Btw, I can't put the link to the java doc of StringTokenizer on here yet, don't have enough posts lol silly...
- 12-03-2008, 12:19 AM #2
Here's what I have:
StringTokenizer st = new StringTokenizer(v, ".,?!:-1234567890");miss.meli (-.-)zzZZ
- 12-03-2008, 09:26 AM #3
- By jeremyk in forum New To JavaReplies: 10Last Post: 02-13-2010, 07:35 PM
- By carderne in forum New To JavaReplies: 1Last Post: 01-26-2008, 09:19 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 11-08-2007, 09:48 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 11-03-2007, 10:24 PM