MCPcopy Index your code
hub / github.com/davidgiven/luje / toCodePoint

Method toCodePoint

lib/java/lang/Character.java:2148–2154  ·  view source on GitHub ↗

Converts a surrogate pair into a Unicode code point. This method assumes that the pair are valid surrogates. If the pair are not valid surrogates, then the result is indeterminate. The #isSurrogatePair(char, char) method should be used prior to this method to validate the pair. @para

(char high, char low)

Source from the content-addressed store, hash-verified

2146 * @since 1.5
2147 */
2148 public static int toCodePoint(char high, char low) {
2149 // See RFC 2781, Section 2.2
2150 // http://www.faqs.org/rfcs/rfc2781.html
2151 int h = (high & 0x3FF) << 10;
2152 int l = low & 0x3FF;
2153 return (h | l) + 0x10000;
2154 }
2155
2156 /**
2157 * Returns the code point at {@code index} in the specified sequence of

Callers 2

codePointAtMethod · 0.95
codePointBeforeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected