soenneker / soenneker.extensions.enumerable.string

A collection of helpful enumerable string extension methods
https://soenneker.com
MIT License
0 stars 0 forks source link

Add IEnumerable<string> ExceptNullOrEmpty / ExceptNullOrWhitespace / DistinctIgnoreCase #528

Closed gigi81 closed 2 months ago

gigi81 commented 2 months ago

Hello again @soenneker

Here some extension methods I would suggest:

Not sure if the best word to use here would be Except or Exclude... or something else.

For example instead of:

arrayofString.Where(s => !string.IsNullOrEmpty(s))
arrayofString.ExceptNullOrEmpty()
soenneker commented 2 months ago

RemoveNullOrEmpty, RemoveNullOrWhitespace, DistinctIgnoreCase chosen.

Please feel free to submit PRs as well - thank you