BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-13-2007, 09:14 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: TDC
Posts: 115
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default java.util.StringTokenizer

Please Login to Remove!

Hmmm... i cant find stringtokenizer class

anyone have a good alternative?
Offline  
Old 08-13-2007, 12:52 PM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

here's one I wrote.
Code:
public static String[] split(String inString, String delimeter) {
		String[] retAr = new String[0];
		boolean finished = false;
		try {
			Vector vec = new Vector();
			int indexA = 0;
			int indexB = inString.indexOf(delimeter);

			while (indexB != -1) {
				if (indexB > indexA)
					vec.addElement(new String(inString
							.substring(indexA, indexB)));
				indexA = indexB + delimeter.length();
				indexB = inString.indexOf(delimeter, indexA);
			}
			vec.addElement(new String(inString.substring(indexA, inString
					.length())));
			retAr = new String[vec.size()];
			for (int i = 0; i < vec.size(); i++) {
				retAr[i] = vec.elementAt(i).toString();
			}
		} catch (Exception e) {
			//sysout

		}
		return retAr;
	}
Offline  
Old 08-14-2007, 02:15 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: TDC
Posts: 115
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

thx a bunch.... ive tested it and it works like a charm
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

(1PCS) M24M02-DRMN6TP IC EEPROM 2MBIT 1MHZ 8SOIC 24M02 M24M02
$4.93
(1PCS) M24M02-DRMN6TP IC EEPROM 2MBIT 1MHZ 8SOIC 24M02 M24M02 picture(1PCS) M95256-WMN6P IC EEPROM 256KBIT 5MHZ 8SOIC 95256 M95256
$3.05
(1PCS) M95256-WMN6P IC EEPROM 256KBIT 5MHZ 8SOIC 95256 M95256 picture(1PCS) M24M01-RMW6TG IC EEPROM 1MBIT 400KHZ 8SOIC 24M01 M24M01
$3.14
(1PCS) M24M01-RMW6TG IC EEPROM 1MBIT 400KHZ 8SOIC 24M01 M24M01 picture(1PCS) M95512-RDW6TP IC EEPROM 512KBIT 2MHZ 8TSSOP 95512 M95512
$2.61
(1PCS) M95512-RDW6TP IC EEPROM 512KBIT 2MHZ 8TSSOP 95512 M95512 picture(1PCS) M24512-WMW6G IC EEPROM 512KBIT 400KHZ 8SOIC 24512 M24512
$3.85
(1PCS) M24512-WMW6G IC EEPROM 512KBIT 400KHZ 8SOIC 24512 M24512 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.