Skip to content

Consider supporting ReadOnlySpan<char> in .NET Standard 2.0 and above #152

@paulomorgado

Description

@paulomorgado

For all the generated code, ReadOnlySpan<char> and MemoryExtensions.Equals can be found on System.Memory.

The only thing missing is the implicit conversion, but calling AsSpan() for those targets solves it. I'd go the extra mile on special targeting this, as the runtimes that provide implicit conversion might improve on int. At least, we avoid the null check.

For the fallback, well, those users already needed to convert it to a string, so, no loss here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions