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)
| 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 |
no outgoing calls
no test coverage detected