❔ ✅ Splitting string without allocation
I'm writing a JsonConverter for Vector3 and I'd like to do this without allocating too much memory.
I've written this extension method to split the string as ReadOnlyMemory. I wanted to use ReadOnlySpan but I'm unable to use this type in IEnumerable<T>.
This is my implementation of Read for JsonConverter<Vector3>
I'd like to know if there are any ways to make my Split method better, and to somehow get my Read method to work.
Thanks for reading
I've written this extension method to split the string as ReadOnlyMemory. I wanted to use ReadOnlySpan but I'm unable to use this type in IEnumerable<T>.
This is my implementation of Read for JsonConverter<Vector3>
I'd like to know if there are any ways to make my Split method better, and to somehow get my Read method to work.
Thanks for reading