On Mon, 24 Nov 2025 15:13:28 GMT, Maurizio Cimadamore <[email protected]> wrote:
> Also, if in the future we also enhance encoders to return the length of a > string w/o encoding it, it might still be useful to have `copy` return the > length (to avoid scanning the string chars twice). I agree, I think there are use-cases for both: if you expect to have enough room in the destination, it's better to avoid scanning the string twice, even if there's a more efficient way to compute the encoded length in the future. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28043#issuecomment-3574725230
