Share via


HelperMethods.StripAccelerators Method

Definition

Overloads

StripAccelerators(String)
Obsolete.

Strips non-escaped accelerator markers ('&') from the given string using the same algorithm used by MsoPwchStripWtz (bugs and all), to wit:

Strip odd '&' chars from the string. As per DrawText, consecutive pairs of '&'s will leave a real '&' character, and all odd '&'s are removed even though only the last may be underlined.

If an '&' occurs inside of parens then the parens and the character following the '&' are also stripped out. This is useful to remove accelarator strings of format (&N) which are appended to label in some FE language versions.

NOTE: We do not check for language to do this i.e. we assume that there isn't any realistic label in other languages with (&N) stuck in.

StripAccelerators(String, Char)
Obsolete.

Strips non-escaped accelerator markers from the given string using the same algorithm used by MsoPwchStripWtz (bugs and all), to wit:

Strip odd chars that match accessSpecifier from the string. As per DrawText, consecutive pairs of characters matching accessSpecifier will leave a single character matching accessSpecifier, and all odd characters matching accessSpecifier are removed even though only the last may be underlined.

If a character matching accessSpecifier occurs inside of parens then the parens and the character following the accessSpecifier matching character are also stripped out. This is useful to remove accelarator strings of format (%accessSpecifier%N) which are appended to label in some FE language versions.

NOTE: We do not check for language to do this i.e. we assume that there isn't any realistic label in other languages with (%accessSpecifier%N) stuck in.

StripAccelerators(String, Object)
Obsolete.

Returns the input string with the specified access key specifier stripped

StripAccelerators(String)

Caution

This method is obsolete. Please use Microsoft.VisualStudio.Utilities.Accelerator.StripAccelerators instead. You may need to add a reference to Microsoft.VisualStudio.Utilities

Strips non-escaped accelerator markers ('&') from the given string using the same algorithm used by MsoPwchStripWtz (bugs and all), to wit:

Strip odd '&' chars from the string. As per DrawText, consecutive pairs of '&'s will leave a real '&' character, and all odd '&'s are removed even though only the last may be underlined.

If an '&' occurs inside of parens then the parens and the character following the '&' are also stripped out. This is useful to remove accelarator strings of format (&N) which are appended to label in some FE language versions.

NOTE: We do not check for language to do this i.e. we assume that there isn't any realistic label in other languages with (&N) stuck in.

public:
 static System::String ^ StripAccelerators(System::String ^ input);
public:
 static Platform::String ^ StripAccelerators(Platform::String ^ input);
 static std::wstring StripAccelerators(std::wstring const & input);
[System.Obsolete("This method is obsolete. Please use Microsoft.VisualStudio.Utilities.Accelerator.StripAccelerators instead. You may need to add a reference to Microsoft.VisualStudio.Utilities")]
public static string StripAccelerators (string input);
[<System.Obsolete("This method is obsolete. Please use Microsoft.VisualStudio.Utilities.Accelerator.StripAccelerators instead. You may need to add a reference to Microsoft.VisualStudio.Utilities")>]
static member StripAccelerators : string -> string
Public Shared Function StripAccelerators (input As String) As String

Parameters

input
String

String to strip.

Returns

input stripped of accelerators.

Attributes

Applies to

StripAccelerators(String, Char)

Caution

This method is obsolete. Please use Microsoft.VisualStudio.Utilities.Accelerator.StripAccelerators instead. You may need to add a reference to Microsoft.VisualStudio.Utilities.

Strips non-escaped accelerator markers from the given string using the same algorithm used by MsoPwchStripWtz (bugs and all), to wit:

Strip odd chars that match accessSpecifier from the string. As per DrawText, consecutive pairs of characters matching accessSpecifier will leave a single character matching accessSpecifier, and all odd characters matching accessSpecifier are removed even though only the last may be underlined.

If a character matching accessSpecifier occurs inside of parens then the parens and the character following the accessSpecifier matching character are also stripped out. This is useful to remove accelarator strings of format (%accessSpecifier%N) which are appended to label in some FE language versions.

NOTE: We do not check for language to do this i.e. we assume that there isn't any realistic label in other languages with (%accessSpecifier%N) stuck in.

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);
[System.Obsolete("This method is obsolete. Please use Microsoft.VisualStudio.Utilities.Accelerator.StripAccelerators instead. You may need to add a reference to Microsoft.VisualStudio.Utilities.")]
public static string StripAccelerators (string input, char accessSpecifier);
[<System.Obsolete("This method is obsolete. Please use Microsoft.VisualStudio.Utilities.Accelerator.StripAccelerators instead. You may need to add a reference to Microsoft.VisualStudio.Utilities.")>]
static member StripAccelerators : string * char -> string
Public Shared Function StripAccelerators (input As String, accessSpecifier As Char) As String

Parameters

input
String

String to strip.

accessSpecifier
Char

Specifies the character to treat as an access key specifier.

Returns

input stripped of accelerators.

Attributes

Applies to

StripAccelerators(String, Object)

Caution

This method is obsolete. Please use Microsoft.VisualStudio.Utilities.Accelerator.StripAccelerators instead. You may need to add a reference to Microsoft.VisualStudio.Utilities.

Returns the input string with the specified access key specifier stripped

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);
[System.Obsolete("This method is obsolete. Please use Microsoft.VisualStudio.Utilities.Accelerator.StripAccelerators instead. You may need to add a reference to Microsoft.VisualStudio.Utilities.")]
public static string StripAccelerators (string input, object accessKeySpecifier);
[<System.Obsolete("This method is obsolete. Please use Microsoft.VisualStudio.Utilities.Accelerator.StripAccelerators instead. You may need to add a reference to Microsoft.VisualStudio.Utilities.")>]
static member StripAccelerators : string * obj -> string
Public Shared Function StripAccelerators (input As String, accessKeySpecifier As Object) As String

Parameters

input
String

String to strip of access key specifiers

accessKeySpecifier
Object

Character to strip

Returns

Attributes

Applies to