Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 0f43a95

Browse files
committed
Add 'Matches' alias for Glob
1 parent c9da83b commit 0f43a95

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

lib/ServiceStack.Client.dll

0 Bytes
Binary file not shown.

lib/ServiceStack.Common.dll

0 Bytes
Binary file not shown.

lib/ServiceStack.Interfaces.dll

0 Bytes
Binary file not shown.

src/ServiceStack.Text/StringExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,11 @@ public static decimal ToDecimal(this string text, decimal defaultValue)
839839
return decimal.TryParse(text, out ret) ? ret : defaultValue;
840840
}
841841

842+
public static bool Matches(this string value, string pattern)
843+
{
844+
return value.Glob(pattern);
845+
}
846+
842847
public static bool Glob(this string value, string pattern)
843848
{
844849
int pos;

0 commit comments

Comments
 (0)