Copies a range of characters into a new string. @param start the offset of the first character. @return a new string containing the characters from start to the end of the string. @throws IndexOutOfBoundsException if start < 0 or start > length().
(int start)
| 1399 | * if {@code start < 0} or {@code start > length()}. |
| 1400 | */ |
| 1401 | public String substring(int start) { |
| 1402 | if (start == 0) { |
| 1403 | return this; |
| 1404 | } |
| 1405 | if (0 <= start && start <= count) { |
| 1406 | return new String(offset + start, count - start, value); |
| 1407 | } |
| 1408 | throw new StringIndexOutOfBoundsException(start); |
| 1409 | } |
| 1410 | |
| 1411 | /** |
| 1412 | * Copies a range of characters into a new string. |
no outgoing calls
no test coverage detected