RFR: 8369564: Provide a MemorySegment API to read strings with known lengths [v2]
Liam Miller-Cushon
cushon at openjdk.org
Wed Oct 29 18:27:42 UTC 2025
On Wed, 29 Oct 2025 17:40:14 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> A user can easily convert between one or the other length representation by multiplying/dividing by the right scalar
That is true of e.g. UTF-16 but not of UTF-8, since the encoding is variable width and doing the conversion from bytes to characters is more expensive there.
> Either way, we felt that it would be a good idea if you could send an email to panama-dev in which you describe your exact use case, before getting further into the code review. That would give others a chance to respond with their use cases as well.
Sounds good, thanks, I can start a thread discussing the use-case here at a higher level.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28043#discussion_r2474577641
More information about the core-libs-dev
mailing list