dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
Mar 31, 2020

Check if a Code Point Is a Surrogate Pair

We can check if a given code point is a surrogate pair as below (128149 is the given code point):

if (Character.toChars(128149).length) == 2) {...} // 2 indicates a surrogate pair 
Octavia Anghel
 
Thanks for your registration, follow us on our social networks to keep up-to-date