(String text, char separator)
| 207 | |
| 208 | /* Divide text to array of parts using separator character */ |
| 209 | static public String[] explode(String text, char separator) { |
| 210 | if (text.equals("")) { |
| 211 | return new String[0]; |
| 212 | } |
| 213 | Vector tmp = new Vector(); |
| 214 | int start = 0; |
| 215 | int end = text.indexOf(separator, start); |
| 216 | while (end >= start) { |
| 217 | tmp.addElement(text.substring(start, end)); |
| 218 | start = end + 1; |
| 219 | end = text.indexOf(separator, start); |
| 220 | } |
| 221 | tmp.addElement(text.substring(start)); |
| 222 | String[] result = new String[tmp.size()]; |
| 223 | tmp.copyInto(result); |
| 224 | return result; |
| 225 | } |
| 226 | |
| 227 | public static Vector sortVectorOfString(Vector e) { |
| 228 | Vector v = new Vector(); |
no test coverage detected