Amazon.S3.Util.AmazonS3Uri.Decode C# (CSharp) Method

Decode() static private method

Percent-decodes the given string.
static private Decode ( string s, int firstPercent ) : string
s string The string to decode
firstPercent int The index of the first '%' in the string
return string
        static string Decode(string s, int firstPercent)
        {
            var sb = new StringBuilder(s.Substring(0, firstPercent));

            AppendDecoded(sb, s, firstPercent);

            for (var i = firstPercent + 3; i < s.Length; ++i)
            {
                if (s[i] == '%')
                {
                    AppendDecoded(sb, s, i);
                    i += 2;
                }
                else
                    sb.Append(s[i]);
            }

            return sb.ToString();
        }

Same methods

AmazonS3Uri::Decode ( string s ) : string