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

Method toChars

classpath/java/lang/Character.java:208–216  ·  view source on GitHub ↗
(int codePoint)

Source from the content-addressed store, hash-verified

206 }
207
208 public static char[] toChars(int codePoint) {
209 if (isSupplementaryCodePoint(codePoint)) {
210 int cpPrime = codePoint - 0x10000;
211 int high = 0xD800 | ((cpPrime >> 10) & 0x3FF);
212 int low = 0xDC00 | (cpPrime & 0x3FF);
213 return new char[] { (char) high, (char) low };
214 }
215 return new char[] { (char) codePoint };
216 }
217
218 public static boolean isSurrogatePair(char high, char low) {
219 return isHighSurrogate(high) && isLowSurrogate(low);

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected