Add Unescape Function

Thanks and Credits to LethalLuck from the Openbullet Anomaly Mod for this
This commit is contained in:
meinname
2019-08-10 02:53:03 +02:00
committed by GitHub
parent 6c285d4078
commit 4a89360a4e
+7
View File
@@ -67,6 +67,9 @@ namespace RuriLib
/// <summary>Decodes a URL-encoded input.</summary> /// <summary>Decodes a URL-encoded input.</summary>
URLDecode, URLDecode,
/// <summary>Unescapes characters in a string.</summary>
Unescape,
/// <summary>Encodes the input to be displayed in HTML or XML.</summary> /// <summary>Encodes the input to be displayed in HTML or XML.</summary>
HTMLEntityEncode, HTMLEntityEncode,
@@ -576,6 +579,10 @@ namespace RuriLib
outputString = Regex.Match(localInputString, ReplaceValues(regexMatch, data)).Value; outputString = Regex.Match(localInputString, ReplaceValues(regexMatch, data)).Value;
break; break;
case Function.Unescape:
outputString = Regex.Unescape(localInputString);
break;
case Function.URLEncode: case Function.URLEncode:
outputString = System.Uri.EscapeDataString(localInputString); outputString = System.Uri.EscapeDataString(localInputString);
break; break;