RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v6]
Tatsunori Uchino
duke at openjdk.org
Tue Jan 27 11:04:49 UTC 2026
On Tue, 27 Jan 2026 11:01: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 one additional commit since the last revision:
>
> Remove `Character.codePointCount` overload
Do I need to merge master? It looks like the CI is failing for reasons unrelated to this PR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26461#issuecomment-3804516489
More information about the core-libs-dev
mailing list