I have to perform a check on a character variable to see whether or not it is a currency symbol. I have discovered the Character.UnicodeBlock.CURRENCY_SYMBOLS constant however I am unsure of how to use this to determine whether or not the character is in that block.
If anyone has done this before help would be much appreciated.
Thanks
Yep, according to Java API – that’s the constant you are looking for.
To get the char type, use the
Character.getType(c)static method, like so: