(CharSequence sequence, int offset)
| 220 | } |
| 221 | |
| 222 | public static int codePointAt(CharSequence sequence, int offset) { |
| 223 | int length = sequence.length(); |
| 224 | if (offset < 0 || offset >= length) { |
| 225 | throw new IndexOutOfBoundsException(); |
| 226 | } |
| 227 | |
| 228 | char high = sequence.charAt(offset); |
| 229 | if (! isHighSurrogate(high) || offset >= length) { |
| 230 | return high; |
| 231 | } |
| 232 | char low = sequence.charAt(offset + 1); |
| 233 | if (! isLowSurrogate(low)) { |
| 234 | return high; |
| 235 | } |
| 236 | |
| 237 | return toCodePoint(high, low); |
| 238 | } |
| 239 | |
| 240 | public static int codePointCount(CharSequence sequence, int start, int end) { |
| 241 | int length = sequence.length(); |
no test coverage detected