-
Notifications
You must be signed in to change notification settings - Fork 3
WildcardMatch
Back to home | Back to Reference | View raw text
A class that can match a string against a given target string with wildcards (i.e. "d*g" can match "dig" or "dog" or "ding").
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi
SolidShineUi.WildcardMatch[[WildcardMatch]]
end
Returns | Name |
---|---|
bool |
MatchesWildcard (... )Match a string against a given target string with wildcards ("*" and "?" are supported). See Remarks for more details. |
A class that can match a string against a given target string with wildcards (i.e. "d*g" can match "dig" or "dog" or "ding").
public static bool MatchesWildcard(string text, string wildcardString)
Type | Name | Description |
---|---|---|
string |
text | The string to test. |
string |
wildcardString | The string to match against, containing the wildcards. |
Match a string against a given target string with wildcards ("*" and "?" are supported). See Remarks for more details.
This function can match a string against a wildcard string. Wildcards are used, for example, in Windows's file dialogs for file filters, as well as other places in Windows or MS-DOS where one or more files can be interacted with. Supported wildcard characters are "", which matches any number of characters, and "?", which matches just one character. (For example, "dg" will match both "dig" and "ding", where as "d?g" will only match "dig", and not "ding" or "dg".) Regex (regular expressions) is a lot more powerful than what wildcards alone can provide, but regex strings can also be a lot more complicated to decipher.
This class was written by H.A. Sullivan.
True if it can be matched; false if they cannot be.
public static bool MatchesWildcard(string text, string wildcardString, bool ignoreCase)
Type | Name | Description |
---|---|---|
string |
text | The string to test. |
string |
wildcardString | The string to match against, containing the wildcards. |
bool |
ignoreCase | Set if letter casing is ignored while matching. |
Match a string against a given target string with wildcards ("*" and "?" are supported). See Remarks for details.
This function can match a string against a wildcard string. Wildcards are used, for example, in Windows's file dialogs for file filters, as well as other places in Windows or MS-DOS where one or more files can be interacted with. Supported wildcard characters are "", which matches any number of characters, and "?", which matches just one character. (For example, "dg" will match both "dig" and "ding", where as "d?g" will only match "dig", and not "ding" or "dg".) Regex (regular expressions) is a lot more powerful than what wildcards alone can provide, but regex strings can also be a lot more complicated to decipher.
This class was written by H.A. Sullivan.
True if it can be matched; false if they cannot be.
Generated with ModularDoc