On Fri, 30 Jan 2026 15:20:03 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?
>
> Tatsunori Uchino has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Use `codePointCountSB` and add its test

Since we are touching `CharSequence`, we might need to revise `CharBuffer` 
(through `X-Buffer.java.template`) to specify `codePointCount` is a relative 
operation.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26461#issuecomment-3824360182

Reply via email to