提交 2dd8eb27 编写于 作者: K kohsuke

added another utility method.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5066 71c3de6d-444a-0410-be80-ed276b4c234a
上级 42afc1fd
......@@ -255,14 +255,21 @@ public class Util {
out.write(buf,0,len);
}
public static String[] tokenize(String s) {
StringTokenizer st = new StringTokenizer(s);
/**
* @since 1.145
*/
public static String[] tokenize(String s,String delimiter) {
StringTokenizer st = new StringTokenizer(s,delimiter);
String[] a = new String[st.countTokens()];
for (int i = 0; st.hasMoreTokens(); i++)
a[i] = st.nextToken();
return a;
}
public static String[] tokenize(String s) {
return tokenize(s," \t\n\r\f");
}
public static String[] mapToEnv(Map<String,String> m) {
String[] r = new String[m.size()];
int idx=0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册