> 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 with a new target base due to a
merge or a rebase. The pull request now contains 38 commits:
- Remove extra harmful boundary check evne in X-Buffer.java.template
- Update `@since` version
- Merge branch 'master' into codepoint-count
- Tweak JavaDoc style
- Fix out of bounds defect
- Add comment
- Fix logic error
- Add test
- Reformat JavaDoc
- Update JavaDoc
- ... and 28 more: https://git.openjdk.org/jdk/compare/b1467bd6...bb731cf9
-------------
Changes: https://git.openjdk.org/jdk/pull/26461/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26461&range=25
Stats: 140 lines in 10 files changed: 125 ins; 0 del; 15 mod
Patch: https://git.openjdk.org/jdk/pull/26461.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26461/head:pull/26461
PR: https://git.openjdk.org/jdk/pull/26461