Like the title says. I want to find out if a given java String contains an emoticon.
I can\'t use Character.UnicodeBlock.of(char) == Character.UnicodeBlock.EMO
Character.UnicodeBlock.of(char) == Character.UnicodeBlock.EMO
Try this...
if (Integer.parseInt("1f600", 16) <= (int)'☺' && (int)'☺' <= Integer.parseInt("1f64f", 16)) { Print.d("Unicode", "groovy!"); }
This might work because the hexidecimal value and the char value are both being converted to ints.