On Thu, 13 Aug 2026 08:45:45 GMT, Tatsunori Uchino <[email protected]> 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?
>>
>> - [x] I confirm that I make this contribution in accordance with the
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Tatsunori Uchino has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Remove extra line in CharSequence
If there are too many concerns about adding this overload to other abstract
classes/interfaces than String, we can postpone it to the future and focus on
String at this time. Could someone modify titles of the corresponding JBS issue
and CSR (I have no authority to do it)?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26461#issuecomment-5289707669