propertylist/IPropertylist: removed obsolete loadTextDB_top()
[metux-java.git] / util / CmdLineSplitter.java
blob3004e66253f437505229b0d190a453dfbe3830ff
2 package org.de.metux.util;
4 // FOO
6 import java.util.StringTokenizer;
8 /*
10 splits an command line into an array of strings.
12 FIXME: currently no quotes and escapes supported.
16 public class CmdLineSplitter
18 public static String[] split(String str)
20 /* with current versions of libgcj we need to use the StringTokenizer,
21 since regex support is missing */
23 str = StrReplace.replace("\\ ","++++++++++++",str).trim();
25 if (str.length()==0)
26 return new String[0];
28 String args[] = str.split(" ");
29 for (int x=0; x<args.length; x++)
30 args[x] = StrReplace.replace("++++++++++++", " ", args[x]);
32 return args;