HierarchyPatternMatch Method |
Checks target string against a simple pattern which allows prefix, suffix, and contains match.
The match is case-sensitive.
Namespace:
KSPDev.ModelUtils
Assembly:
KSPDev_Utils.1.2 (in KSPDev_Utils.1.2.dll) Version: 1.2 for KSP v1.6+
Syntaxpublic static bool PatternMatch(
string pattern,
string target
)
Request Example
View SourceParameters
- pattern
- Type: SystemString
Pattern to match for:
- If pattern ends with * then it's a match by prefix.
- If pattern starts with * then it's a match by suffix.
-
If pattern starts and ends with * then pattern is searched anywhere in the target.
- target
- Type: SystemString
The target string to check.
Return Value
Type:
Booleantrue if pattern matches the target.
See Also