How to determine whether a character (Unicode code point) is in the supplementary character range in Java

1 Answer

0 votes
package javaapplication1;
  
public class JavaApplication1 {
  
    public static void main(String[] args) {
  
        int ch = 0x10fef;
 
        boolean b;
         
        b = Character.isSupplementaryCodePoint(ch);
        System.out.println(b);
         
        System.out.println(Character.isSupplementaryCodePoint(0x004ab));
    }
}
  
/*
run:
 
true
false
  
*/

 



answered Sep 15, 2016 by avibootz
edited Sep 17, 2016 by avibootz
...