I currently have a code base where I pass around a string as a ReadOnlySpan<char> and I'd like to call ToString() at the latest moment possible. However, I'd also like to guard against NullOrEmpty or NullOrWhiteSpace. Perhaps even against a pattern but I suppose that's impossible with regex and span.
I currently have a code base where I pass around a string as a
ReadOnlySpan<char>and I'd like to callToString()at the latest moment possible. However, I'd also like to guard againstNullOrEmptyorNullOrWhiteSpace. Perhaps even against a pattern but I suppose that's impossible with regex and span.