Class EnumerableExtensions
Text-related extension methods for
Inheritance
System.Object
EnumerableExtensions
Namespace: X10D.Text
Assembly: X10D.dll
Syntax
public static class EnumerableExtensions : object
Methods
| Improve this Doc View SourceGrep(IEnumerable<String>, String)
Filters a sequence of strings by regular expression.
Declaration
public static IEnumerable<string> Grep(this IEnumerable<string> source, string pattern)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | source | The sequence of strings to filter. |
System.String | pattern | The regular expression pattern to use for matching. |
Returns
Type | Description |
---|---|
IEnumerable<System.String> | The filtered sequence. |
Grep(IEnumerable<String>, String, Boolean)
Filters a sequence of strings by regular expression, optionally allowing to ignore casing.
Declaration
public static IEnumerable<string> Grep(this IEnumerable<string> source, string pattern, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | source | The sequence of strings to filter. |
System.String | pattern | The regular expression pattern to use for matching. |
System.Boolean | ignoreCase | true to ignore casing when matching; otherwise, false. |
Returns
Type | Description |
---|---|
IEnumerable<System.String> | The filtered sequence. |