-
Notifications
You must be signed in to change notification settings - Fork 43
Char Query Operations
Malcolm Groves edited this page Jan 14, 2014
·
8 revisions
FluentQuery supports the following operations when querying chars from a container (eg, a String, or a TList<char>):
| Operation | Bound | Unbound | Terminating | Description |
|---|---|---|---|---|
| Equals | Yes | Yes | Enumerates chars that are exact, case-sensitive matches to the supplied char. | |
| First | Yes | Yes | Enumerate the first char, ignoring the remainder. | |
| From | Yes | From allows you to specify the source of the data you are querying. It is also From which transforms an Unbound Query into a Bound Query. | ||
| IsControl | Yes | Yes | Enumerates chars that are Unicode control characters | |
| IsDigit | Yes | Yes | Enumerates chars that are Unicode digits | |
| IsHighSurrogate | Yes | Yes | Enumerates chars that are Unicode high surrogates | |
| IsInArray | Yes | Yes | Enumerates only chars that are also found in a supplied Array of Char | |
| IsLetter | Yes | Yes | Enumerates chars that are Unicode letters | |
| IsLetterOrDigit | Yes | Yes | Enumerates chars that are Unicode digits or letters | |
| IsLower | Yes | Yes | Enumerates chars that are lower case | |
| IsLowSurrogate | Yes | Yes | Enumerates chars that are Unicode low surrogates | |
| IsNumber | Yes | Yes | Enumerates chars that are Unicode numbers | |
| IsPunctuation | Yes | Yes | Enumerates chars that are Unicode punctuation characters | |
| IsSeparator | Yes | Yes | Enumerates chars that are Unicode separator characters | |
| IsSurrogate | Yes | Yes | Enumerates chars that are Unicode surrogates | |
| IsSymbol | Yes | Yes | Enumerates chars that are Unicode symbols | |
| IsUpper | Yes | Yes | Enumerates chars that are upper case | |
| IsWhitespace | Yes | Yes | Enumerates chars that are Unicode whitespace characters | |
| Matches | Yes | Yes | Enumerates chars that match the supplied char. Can be either case-sensitive or insensitive, but is insensitive by default. | |
| NotEquals | Yes | Yes | Enumerates chars that are not exact, case-sensitive matches to the supplied char. | |
| Predicate | Yes | Yes | Returns a TPredicate<Char> encapsulating the supplied Unbound Query logic. | |
| Skip | Yes | Yes | Skip will bypass the specified number of chars from the start of the enumeration, after which it will enumerate the remaining chars as normal. | |
| SkipWhile(Predicate) | Yes | Yes | SkipWhile will bypass chars at the start of the enumeration while the supplied Predicate evaluates True. Once the Predicate evaluates false, all remaining chars will be enumerated as normal. | |
| SkipWhile(UnboundQuery) | Yes | Yes | SkipWhile will bypass chars at the start of the enumeration that match the supplied Unbound Query. Once a char does not match the supplied query, all remaining chars will be enumerated as normal. | |
| Take | Yes | Yes | Take will enumerate up to the specified number of chars, then ignore the remainder. | |
| TakeWhile(Predicate) | Yes | Yes | TakeWhile will continue enumerating chars while the supplied Predicate evaluates True, after which it will ignore the remaining chars. | |
| TakeWhile(UnboundQuery) | Yes | Yes | TakeWhile will continue enumerating chars while they match the supplied Unbound Query, after which it will ignore the remaining chars. | |
| ToAString | Yes | Yes | Returns a String containing the chars that match the query | |
| Where(Predicate) | Yes | Yes | Filter the chars enumerated to only those that evaluate true when passed into the supplied Predicate | |
| WhereNot(Predicate) | Yes | Yes | Filter the chars enumerated to only those that evaluate false when passed into the supplied Predicate | |
| WhereNot(UnboundQuery) | Yes | Yes | Filter the chars enumerated to only those that do not match the supplied Unbound Query |