On Mon, 24 Nov 2025 15:07:47 GMT, Maurizio Cimadamore <[email protected]> 
wrote:

> I have tentatively updated the new MemorySegment#copy to return the number of 
> bytes that were written.

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).

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

PR Comment: https://git.openjdk.org/jdk/pull/28043#issuecomment-3571278579

Reply via email to