RFC7950 specifies that string length is counted in unicode
characters. String.length() returns the length in code units of
UTF-16, which are not the same thing.
Use String.codePointCount() to get correct results for strings
containing characters from outside of Unicode BMP.
JIRA: YANGTOOLS-1224
Change-Id: I6ff9557d61449625be975eaca00ad235bf429155
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
cbadacd601e11552b749edfaaa19b64b9804e55f)