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

Commit 3e5a840

Browse files
committed
Add IsValidVarRef
1 parent 379c4ff commit 3e5a840

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ServiceStack.Text/StringExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ public static bool ContainsAny(this string text, string[] testMatches, StringCom
952952
}
953953

954954
public static bool IsValidVarName(this string name) => InvalidVarCharsRegex.IsMatch(name);
955+
public static bool IsValidVarRef(this string name) => InvalidVarRefCharsRegex.IsMatch(name);
955956

956957
public static string SafeVarName(this string text) => !string.IsNullOrEmpty(text)
957958
? InvalidVarCharsRegex.Replace(text, "_") : null;

0 commit comments

Comments
 (0)