I have this:
char c = "\ud804\udef4".charAt(0);
char d = "\ud804\udef4".charAt(1);
How will I print c and d as hex Strings ?
I want d804 for c and def4 for d.
I have this:
char c = "\ud804\udef4".charAt(0);
char d = "\ud804\udef4".charAt(1);
How will I print c and d as hex Strings ?
I want d804 for c and def4 for d.
Copyright © 2021 Jogjafile Inc.
It doesn't matter whether the char is a surrogate pair or not. If you have a
char, you can convert it to a hex string byInteger.toHexString(), sincechars can be implicitly converted toint.