Given a String string
in Java, does string.codePoints().toArray().length
reflect the length of the String
in terms of the actual characters that a human would find meaningful? In other words, does it smooth over escape characters and other artifacts of encoding?
Edit By "human" I kind of meant "programmer" as I would imagine most programmers would see \r\n
as two characters, ESC
as one character, etc. But now I see that even the accent marks get atomized so it doesn't matter.