Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In Java,

    " ".codePoints().count()
    ==> 5

    " ".chars().count()
    ==> 7

    " ".getBytes(UTF_8).length
    ==> 17

(HN doesn't render the emoji in comments, it seems)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: