I edited (deleted) my previous answer. I think the simplest way would be this regular expression:
string input = "s&trings && stuf&f &";
input = Regex.Replace(input, "&(.)", "$1");
This handles repeating ampersands correctly, as well as the case where the ampersand is the last character.
EDIT, based on additional information:
, WinForms "&(.?)", WPF "_(.)". , , , . , , WPF WinForms. :
string StripAccelerators(string s, bool isWinForms)
{
string pat = (isWinForms) ? "&(.?)" : "_(.)";
return Regex.Replace(s, pat, "$1");
}
, , , Boolean . , , .
, , . , WinForms WPF.