> 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 45 commits:

 - Improve tests on Supplementary.test8
 - Fix method name in assertion failure messages
 - Merge remote-tracking branch 'upstream/master' into codepoint-count
 - Change "isolated surrogate code unit" to "unpaired surrogate"
 - Reapply JavaDoc
 - Restrict change scope to String
 - Remove extra line in CharSequence
 - Remove extra harmful boundary check evne in X-Buffer.java.template
 - Update `@since` version
 - Merge branch 'master' into codepoint-count
 - ... and 35 more: https://git.openjdk.org/jdk/compare/ef54ca1c...209e1cc8

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

Changes: https://git.openjdk.org/jdk/pull/26461/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26461&range=30
  Stats: 36 lines in 3 files changed: 26 ins; 2 del; 8 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

Reply via email to