mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
added another utility method.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5066 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
42afc1fd02
commit
2dd8eb270b
1 file changed
+9
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user