2 package org
.de
.metux
.util
;
6 public static boolean isEmpty(String str
[])
8 if ((str
==null)||(str
.length
==0))
11 for (int x
=0; x
<str
.length
; x
++)
18 public static boolean isEmpty(String str
)
20 if ((str
==null)||(str
.length()==0))
30 public static String
fix_notnull(String str
)
38 public static String
fold(String
[] str
)
44 for (int x
=0; x
<str
.length
; x
++)
46 res
+= ((res
.length()==0) ?
"" : " ")+str
[x
];
51 public static boolean toBool(String str
, boolean def
)
57 catch (NumberFormatException e
)
63 public static boolean toBool(String str
)
64 throws NumberFormatException
66 str
= str
.toLowerCase();
68 if (str
.equals("yes") ||
70 str
.equals("enabled") ||
75 if (str
.equals("no") ||
77 str
.equals("disabled") ||
82 throw new NumberFormatException(str
);
85 public String
[] trim(String s
[])
93 for (int x
=0; x
<s
.length
; x
++)
100 String n
[] = new String
[sz
];
102 for (int x
=0; x
<s
.length
; x
++)