Class EnumerableStringExtension
Provides extension methods for IEnumerable<T> to enhance and simplify operations on collections.
Namespace: Coree.NETStandard.Extensions
Assembly: Coree.NETStandard.dll
Syntax
public static class EnumerableStringExtension
Remarks
This static class contains a collection of utility methods that extend the functionality of the IEnumerable<T> interface. These methods offer convenient ways to perform common operations on enumerable collections, such as filtering, transformation, and aggregation, with a focus on improving code readability and efficiency. This class is declared as partial to allow for easy extension and organization of its methods across multiple files, facilitating maintainability and scalability of the utility functions provided.
Methods
| Edit this page View SourceRemoveNullOrWhiteSpaceEntries(IEnumerable<string?>)
Filters out null, empty, and whitespace-only entries from an IEnumerable<T>.
Declaration
public static IEnumerable<string> RemoveNullOrWhiteSpaceEntries(this IEnumerable<string?> enumerable)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<string> | enumerable | The enumerable collection of strings to filter. |
Returns
Type | Description |
---|---|
IEnumerable<string> | An IEnumerable<T> consisting of non-empty and non-whitespace strings. |
Remarks
This extension method iterates over each element in the given enumerable, returning only those elements that are not null, not empty, and not made up solely of whitespace characters.