Accelerator.StripAccelerators 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
StripAccelerators(String) |
使用 MsoPwchStripWtz 所使用的相同演算法,從指定字串 ('&') 等量非逸出加速器標記, (錯誤和所有) :: 從字串移除奇數 '&' 字元。 根據 DrawText,連續的 '& 配對會留下實際的 '&' 字元,而且即使只有最後一個可能會加底線,也會移除所有奇數 '&'。 如果在剖析內發生 『&』,則會移除 『&』 後面的剖析和字元。這對於移除格式化 (&N) 格式的加號字串很有用,這些字串會附加至某些 FE 語言版本中的卷標。 注意:我們不會檢查語言是否執行此動作,亦即,我們假設 (&N) 卡在其他語言中沒有任何實際標籤。 |
StripAccelerators(String, Char) |
使用 MsoPwchStripWtz 所使用的相同演算法,從指定的字串去除非逸出加速器標記, (Bug 和所有) ,以 wit:
從字串中比對
如果在剖析內發生字元比 注意:我們不會檢查語言是否執行此動作,亦即假設其他語言中沒有任何實際標籤, (%accessSpecifier%N) 停滯。 |
StripAccelerators(String, Object) |
傳回具有已移除指定存取金鑰規範的輸入字串 |
StripAccelerators(String)
使用 MsoPwchStripWtz 所使用的相同演算法,從指定字串 ('&') 等量非逸出加速器標記, (錯誤和所有) ::
從字串移除奇數 '&' 字元。 根據 DrawText,連續的 '& 配對會留下實際的 '&' 字元,而且即使只有最後一個可能會加底線,也會移除所有奇數 '&'。
如果在剖析內發生 『&』,則會移除 『&』 後面的剖析和字元。這對於移除格式化 (&N) 格式的加號字串很有用,這些字串會附加至某些 FE 語言版本中的卷標。
注意:我們不會檢查語言是否執行此動作,亦即,我們假設 (&N) 卡在其他語言中沒有任何實際標籤。
public:
static System::String ^ StripAccelerators(System::String ^ input);
public:
static Platform::String ^ StripAccelerators(Platform::String ^ input);
static std::wstring StripAccelerators(std::wstring const & input);
public static string StripAccelerators (string input);
static member StripAccelerators : string -> string
Public Shared Function StripAccelerators (input As String) As String
參數
- input
- String
要帶狀的字串。
傳回
input
已移除快捷鍵。
適用於
StripAccelerators(String, Char)
使用 MsoPwchStripWtz 所使用的相同演算法,從指定的字串去除非逸出加速器標記, (Bug 和所有) ,以 wit:
從字串中比對 accessSpecifier
的奇數位元。
根據 DrawText,連續配對的字元比 accessSpecifier
對會保留單一字元比對 accessSpecifier
,而且即使只加上最後一個字元底線,也會移除所有奇數位元 accessSpecifier
比對。
如果在剖析內發生字元比 accessSpecifier
對,則也會移除比對字元後面的 accessSpecifier
剖析和字元。這適用於移除格式 (%accessSpecifier%N) 格式的加號字串,這些字串會附加至某些FE語言版本中的標籤。
注意:我們不會檢查語言是否執行此動作,亦即假設其他語言中沒有任何實際標籤, (%accessSpecifier%N) 停滯。
public:
static System::String ^ StripAccelerators(System::String ^ input, char accessSpecifier);
public:
static Platform::String ^ StripAccelerators(Platform::String ^ input, char16 accessSpecifier);
static std::wstring StripAccelerators(std::wstring const & input, char accessSpecifier);
public static string StripAccelerators (string input, char accessSpecifier);
static member StripAccelerators : string * char -> string
Public Shared Function StripAccelerators (input As String, accessSpecifier As Char) As String
參數
- input
- String
要帶狀的字串。
- accessSpecifier
- Char
指定要視為存取金鑰規範的字元。
傳回
input
已移除快捷鍵。
適用於
StripAccelerators(String, Object)
傳回具有已移除指定存取金鑰規範的輸入字串
public:
static System::String ^ StripAccelerators(System::String ^ input, System::Object ^ accessKeySpecifier);
public:
static Platform::String ^ StripAccelerators(Platform::String ^ input, Platform::Object ^ accessKeySpecifier);
static std::wstring StripAccelerators(std::wstring const & input, winrt::Windows::Foundation::IInspectable const & accessKeySpecifier);
public static string StripAccelerators (string input, object accessKeySpecifier);
static member StripAccelerators : string * obj -> string
Public Shared Function StripAccelerators (input As String, accessKeySpecifier As Object) As String
參數
- input
- String
要移除存取金鑰規範的字串
- accessKeySpecifier
- Object
要帶狀的字元