I need to do some things with code points and a new line. I have a function that accepts code char, and if it is \r, it should behave differently. I have it:
if (codePoint == Character.codePointAt(new char[] {'\r'}, 0)) {
but this is very ugly and certainly not the right way to do this. What is the right way to do this?
(I know that I could hardcode the number 13(decimal identifier for \r) and use it, but that would make it unclear what I am doing ...)
source
share