Method RemoveMnemonicMarkers
RemoveMnemonicMarkers(string, char)
Removes mnemonic markers from a string, such as a specified character used to indicate shortcut keys.
public static string RemoveMnemonicMarkers(string input, char mnemonicMarker = '&')
Parameters
inputstringThe input string potentially containing mnemonic markers.
mnemonicMarkercharThe character used to mark mnemonic access keys. Single instances indicate a mnemonic; double instances represent a literal marker.
Returns
- string
A cleaned string with mnemonic markers removed and escaped markers collapsed into a single literal. Returns the original string if
inputis null or empty.
Remarks
Commonly used for stripping mnemonic markup from UI labels, preserving readability while removing access key symbols.