private Unescape ( string escaped ) : string | ||
escaped | string | |
Результат | string |
private string Unescape(string escaped)
{
int index = 0;
StringBuilder retVal = new StringBuilder ();
while (index >= 0) {
int lastIndex = index;
index = FindNextNotEscaped (lastIndex + 1, escaped, "\\");
if (index == -1)
retVal.Append (escaped.Substring (lastIndex));
else {
retVal.Append (escaped.Substring (lastIndex, index - lastIndex));
index++;
}
}
return retVal.ToString ();
}