System.Web.HttpMultipart.GetContentDispositionAttributeWithEncoding C# (CSharp) Method

GetContentDispositionAttributeWithEncoding() private method

private GetContentDispositionAttributeWithEncoding ( string l, string name ) : string
l string
name string
return string
		string GetContentDispositionAttributeWithEncoding (string l, string name)
		{
			int idx = l.IndexOf (name + "=\"");
			if (idx < 0)
				return null;
			int begin = idx + name.Length + "=\"".Length;
			int end = l.IndexOf ('"', begin);
			if (end < 0)
				return null;
			if (begin == end)
				return "";

			string temp = l.Substring (begin, end - begin);
			byte [] source = new byte [temp.Length];
			for (int i = temp.Length - 1; i >= 0; i--)
				source [i] = (byte) temp [i];

			return encoding.GetString (source);
		}