<i18n dev> RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v23]
Tatsunori Uchino
duke at openjdk.org
Wed Feb 4 12:41:32 UTC 2026
On Sun, 1 Feb 2026 12:55:29 GMT, Tatsunori Uchino <duke at openjdk.org> wrote:
>> Adds `codePointCount()` overloads to `String`, `Character`, `(Abstract)StringBuilder`, and `StringBuffer` to make it possible to conveniently retrieve the length of a string as code points without extra boundary checks.
>>
>>
>> if (superTremendouslyLongExpressionYieldingAString().codePointCount() > limit) {
>> throw new Exception("exceeding length");
>> }
>>
>>
>> Is a CSR required to this change?
>
> Tatsunori Uchino has updated the pull request incrementally with two additional commits since the last revision:
>
> - Add comment
> - Fix logic error
Can I commit test\jdk\java\nio\Buffer\build\tools\sp\Spp.class? It was generated by `genBasic.sh`. The other files were not changed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26461#issuecomment-3847208289
More information about the i18n-dev
mailing list