// // // namespace ERP.Framework.Utils { public class UrlUtil { public static bool Match(string pattern, string path) { string[] patternParts = pattern.Split('*', StringSplitOptions.RemoveEmptyEntries); int currentIndex = 0; foreach (string patternPart in patternParts) { int index = path.IndexOf(patternPart, currentIndex, StringComparison.OrdinalIgnoreCase); if (index == -1) { return false; } currentIndex = index + patternPart.Length; } return true; } } }