<i18n dev> RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v23]
Tatsunori Uchino
duke at openjdk.org
Sun Feb 1 15:10:12 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
I don't know how to fix the offending "tools/javac/patterns/Exhaustiveness" error.
https://github.com/tats-u/jdk/actions/runs/21563196651#summary-62131220808
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26461#issuecomment-3831173111
More information about the i18n-dev
mailing list