(String text, int offset, String prefix)
| 98 | } |
| 99 | |
| 100 | private static int expectPrefix(String text, int offset, String prefix) throws ParseException { |
| 101 | if (text.length() <= offset) throw new ParseException("Short date: " + text, offset); |
| 102 | if (! text.substring(offset).startsWith(prefix)) throw new ParseException("Parse error: " + text, offset); |
| 103 | return offset + prefix.length(); |
| 104 | } |
| 105 | } |
no test coverage detected