Skip until the given string is matched in the stream. When returned, the context is positioned past the end of the match. @param limit The String to match. @return A non-null Mark instance (positioned immediately before the search string) if found, null ot
(String limit)
| 388 | * <strong>null</strong> otherwise. |
| 389 | */ |
| 390 | Mark skipUntil(String limit) { |
| 391 | Mark ret = mark(); |
| 392 | int limlen = limit.length(); |
| 393 | char firstChar = limit.charAt(0); |
| 394 | Boolean result; |
| 395 | Mark restart = null; |
| 396 | |
| 397 | skip: |
| 398 | while ((result = indexOf(firstChar, ret)) != null) { |
| 399 | if (result.booleanValue()) { |
| 400 | if (restart != null) { |
| 401 | restart.init(current, true); |
| 402 | } else { |
| 403 | restart = mark(); |
| 404 | } |
| 405 | for (int i = 1; i < limlen; i++) { |
| 406 | if (peekChar() == limit.charAt(i)) { |
| 407 | nextChar(); |
| 408 | } else { |
| 409 | current.init(restart, true); |
| 410 | continue skip; |
| 411 | } |
| 412 | } |
| 413 | return ret; |
| 414 | } |
| 415 | } |
| 416 | return null; |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * Skip until the given string is matched in the stream, but ignoring chars initially escaped by a '\' and any EL |
no test coverage detected