MCPcopy Create free account
hub / github.com/ReadyTalk/avian / codePointAt

Method codePointAt

classpath/java/lang/Character.java:222–238  ·  view source on GitHub ↗
(CharSequence sequence, int offset)

Source from the content-addressed store, hash-verified

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();

Callers 1

codePointAtMethod · 0.95

Calls 5

isHighSurrogateMethod · 0.95
isLowSurrogateMethod · 0.95
toCodePointMethod · 0.95
lengthMethod · 0.65
charAtMethod · 0.65

Tested by

no test coverage detected