The Character.isHighSurrogate() method is a boolean function that determines whether the specified char value is a high surrogate. A high surrogate is a Unicode code unit in the range U+D800 to U+DBFF that is used to represent the first of two code units in a surrogate pair used for encoding characters in the Unicode standard.
Example 1: Character.isHighSurrogate('\uD835') will return true. This is because '\uD835' is a high surrogate value.
Example 2: Character.isHighSurrogate('A') will return false because 'A' is not a high surrogate value.
Code example:
char highSurrogate = '\uD835'; boolean isHigh = Character.isHighSurrogate(highSurrogate); if(isHigh) { // perform operation for high surrogate value } else { // perform operation for other characters }
This method is found in the java.lang package, which is a part of the Java Standard Library.
Java Character.isHighSurrogate - 30 examples found. These are the top rated real world Java examples of Character.isHighSurrogate extracted from open source projects. You can rate examples to help us improve the quality of examples.