Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Unescape()

static string System.Security.SecurityElement.Unescape ( string str)
inlinestaticprivate

Definition at line 389 of file SecurityElement.cs.

390 {
391 if (str == null)
392 {
393 return null;
394 }
395 StringBuilder stringBuilder = null;
396 int length = str.Length;
397 int newIndex = 0;
398 while (true)
399 {
400 int num = str.IndexOf('&', newIndex);
401 if (num == -1)
402 {
403 break;
404 }
405 if (stringBuilder == null)
406 {
407 stringBuilder = new StringBuilder();
408 }
409 stringBuilder.Append(str, newIndex, num - newIndex);
410 stringBuilder.Append(GetUnescapeSequence(str, num, out newIndex));
411 }
412 if (stringBuilder == null)
413 {
414 return str;
415 }
416 stringBuilder.Append(str, newIndex, length - newIndex);
417 return stringBuilder.ToString();
418 }
static string GetUnescapeSequence(string str, int index, out int newIndex)
override string ToString()
StringBuilder Append(char value, int repeatCount)

References System.Text.StringBuilder.Append(), System.Security.SecurityElement.GetUnescapeSequence(), System.length, System.Text.StringBuilder.Length, System.str, and System.Text.StringBuilder.ToString().