Method FindHotKey
FindHotKey(ustring, Rune, bool, out int, out Key)
Finds the hotkey and its location in text.
public static bool FindHotKey(ustring text, Rune hotKeySpecifier, bool firstUpperCase, out int hotPos, out Key hotKey)
Parameters
textustringThe text to look in.
hotKeySpecifierRuneThe hotkey specifier (e.g. '_') to look for.
firstUpperCaseboolIf
truethe legacy behavior of identifying the first upper case character as the hotkey will be enabled. Regardless of the value of this parameter,hotKeySpecifiertakes precedence.hotPosintOutputs the Rune index into
text.hotKeyKeyOutputs the hotKey.
Returns
- bool
trueif a hotkey was found;falseotherwise.