01: /*
02: * StringHelper.java
03: *
04: * Created on May 16, 2003, 7:27 PM
05: */
06:
07: package com.sun.portal.util;
08:
09: import java.util.StringTokenizer;
10:
11: /**
12: *
13: * @author mm132998
14: * @version
15: */
16: public class StringHelper {
17:
18: public static String[] split(String source, char delimiter) {
19: StringTokenizer st = new StringTokenizer(source.trim(), ""
20: + delimiter);
21: String[] ret = new String[st.countTokens()];
22: for (int index = 0; index < ret.length; index++) {
23: ret[index] = st.nextToken().trim();
24: }
25: return ret;
26: }
27: }
|