I'm looking for a fast .NET class/library that has a StringComparer that supports wildcard (*) AND incase-sensitivity. Any Ideas?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
Alternatively you can use these extended functions:
CompareWildcards compares a string against multiple wildcard patterns, and CompareWildcard compares a string against a single wildcard pattern.
Example usage:
You could use Regex with RegexOptions.IgnoreCase, then compare with the IsMatch method.
This would match
prefix*suffix
. You might also consider using StartsWith or EndsWith as alternatives.alternatively you can try following