Uri.EscapeString(String) Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Внимание!
Uri.EscapeString has been deprecated. Use GetComponents() or Uri.EscapeDataString to escape a Uri component or a string.
Внимание!
The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. https://go.microsoft.com/fwlink/?linkid=14202
Внимание!
Uri.EscapeString has been deprecated. Use GetComponents() or static EscapeDataString() to escape a Uri component or a string.
Внимание!
The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. http://go.microsoft.com/fwlink/?linkid=14202
Преобразует строку в его экранированное представление.
protected:
static System::String ^ EscapeString(System::String ^ str);
[System.Obsolete("Uri.EscapeString has been deprecated. Use GetComponents() or Uri.EscapeDataString to escape a Uri component or a string.")]
protected static string EscapeString(string? str);
[System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. https://go.microsoft.com/fwlink/?linkid=14202")]
protected static string EscapeString(string? str);
[System.Obsolete("Uri.EscapeString has been deprecated. Use GetComponents() or static EscapeDataString() to escape a Uri component or a string.")]
protected static string EscapeString(string? str);
[System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. http://go.microsoft.com/fwlink/?linkid=14202")]
protected static string EscapeString(string str);
protected static string EscapeString(string str);
[System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. https://go.microsoft.com/fwlink/?linkid=14202")]
protected static string EscapeString(string str);
[<System.Obsolete("Uri.EscapeString has been deprecated. Use GetComponents() or Uri.EscapeDataString to escape a Uri component or a string.")>]
static member EscapeString : string -> string
[<System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. https://go.microsoft.com/fwlink/?linkid=14202")>]
static member EscapeString : string -> string
[<System.Obsolete("Uri.EscapeString has been deprecated. Use GetComponents() or static EscapeDataString() to escape a Uri component or a string.")>]
static member EscapeString : string -> string
[<System.Obsolete("The method has been deprecated. Please use GetComponents() or static EscapeUriString() to escape a Uri component or a string. http://go.microsoft.com/fwlink/?linkid=14202")>]
static member EscapeString : string -> string
static member EscapeString : string -> string
Protected Shared Function EscapeString (str As String) As String
Параметры
- str
- String
Строка для преобразования в его экранированное представление.
Возвращаемое значение
Экранированное представление строки.
- Атрибуты
Комментарии
Метод EscapeString преобразует зарезервированные символы RFC 2396 и все символы со значением символа больше 127 в шестнадцатеричное представление. Все символы Юникода преобразуются в формат UTF-8 перед экранированием.
По умолчанию строка экранируется в соответствии с RFC 2396. Если включена функция синтаксического анализа международных идентификаторов ресурсов (IRIs) или международного доменного имени (IDN), строка экранируется в соответствии с RFC 3986 и RFC 3987.
Дополнительные сведения о поддержке IRI см. в разделе "Примечания" для Uri класса.