Uri.EscapeString(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
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 的字元轉換為十六進位表示。 所有 Unicode 字元在轉義前都會被轉換成 UTF-8 格式。
預設情況下,字串會依據 RFC 2396 進行轉義。 若啟用國際資源識別碼(IRI)或國際化網域名稱(IDN)解析,則依據 RFC 3986 與 RFC 3987,字串會被轉義。
欲了解更多關於IRI支援的資訊,請參閱該 Uri 課程備註區。