Returns the right part of the string from the last occruence of c.
(String in, char c)
| 239 | |
| 240 | /** Returns the right part of the string from the last occruence of c. */ |
| 241 | public static String rightFrom(String in, char c) { |
| 242 | int pos = in.lastIndexOf(c); |
| 243 | if (pos == -1) |
| 244 | return ""; |
| 245 | else if (pos < in.length()) |
| 246 | return in.substring(pos + 1, in.length()); |
| 247 | return ""; |
| 248 | } |
| 249 | |
| 250 | /** Returns the left part of the string from the last occruence of c. */ |
| 251 | public static String leftFrom(String in, char c) { |
no outgoing calls
no test coverage detected