<i18n dev> RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v20]
Tatsunori Uchino
duke at openjdk.org
Sun Feb 1 06:28:49 UTC 2026
> 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:
- Update JavaDoc
- Fix broken test methods calls
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26461/files
- new: https://git.openjdk.org/jdk/pull/26461/files/81245159..8b5db22c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26461&range=19
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26461&range=18-19
Stats: 7 lines in 2 files changed: 3 ins; 0 del; 4 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
More information about the i18n-dev
mailing list