Find the position of the nth slash, in the given char chunk.
(CharChunk name, int n)
| 1445 | * Find the position of the nth slash, in the given char chunk. |
| 1446 | */ |
| 1447 | private static int nthSlash(CharChunk name, int n) { |
| 1448 | char[] c = name.getBuffer(); |
| 1449 | int end = name.getEnd(); |
| 1450 | int pos = name.getStart(); |
| 1451 | int count = 0; |
| 1452 | |
| 1453 | while (pos < end) { |
| 1454 | if ((c[pos++] == '/') && ((++count) == n)) { |
| 1455 | pos--; |
| 1456 | break; |
| 1457 | } |
| 1458 | } |
| 1459 | |
| 1460 | return pos; |
| 1461 | } |
| 1462 | |
| 1463 | |
| 1464 | /** |
no test coverage detected