If we have a code-point, we can check if it is a Unicode surrogate pair as follows:
int cp = some_code_point;if(Character.charCount(cp) == 2) { // 2 means a surrogate pair
Home » Check That a Code-Point Is a Unicode Surrogate Pair
If we have a code-point, we can check if it is a Unicode surrogate pair as follows:
int cp = some_code_point;if(Character.charCount(cp) == 2) { // 2 means a surrogate pair
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
See our full editorial policy.