Returns the left part of the string from the last occruence of c.
(String in, char c)
| 249 | |
| 250 | /** Returns the left part of the string from the last occruence of c. */ |
| 251 | public static String leftFrom(String in, char c) { |
| 252 | int pos = in.lastIndexOf(c); |
| 253 | if (pos == -1) |
| 254 | return ""; |
| 255 | else if (pos < in.length()) |
| 256 | return in.substring(0, pos); |
| 257 | return ""; |
| 258 | } |
| 259 | |
| 260 | /** Renames a file. */ |
| 261 | public static int rename(String oldn, String newn) { |
no outgoing calls
no test coverage detected