Iaik.Utils.SimpleFormatter.Unescape C# (CSharp) Method

Unescape() private method

private Unescape ( string escaped ) : string
escaped string
return 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 ();
        }