How to get string from ReadOnlyMemory<char> without allocation?

Viewed 386

Can we get string reference from ReadonlyMemory<char> without re-allocating on heap.

ReadonlyMemory<char> someChars;//I got ReadOnlyMemory<char> from somewhere
string str = someChars.SomeMethodToGetStringWithoutAllocation();//I am looking for this
0 Answers
Related