[API Proposal]: Path.ContainsInvalidPathChar and Path.ContainsInvalidFileNameChar #110301
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.IO
untriaged
New issue has not been triaged by the area owner
Background and motivation
Path.GetInvalidFileNameChars()
andPath.GetInvalidPathChars()
each make a copy and aren't even very convenient for one of the most common operation you want to do with them: ask if your string contains one.API Proposal
API Usage
(Instead of caching in a
static
and using.AsSpan().ContainsAny(...)
.)Alternative Designs
Maybe expose
SearchValues
. (Could do this in addition to the above proposal.)Risks
No response
The text was updated successfully, but these errors were encountered: