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
text
ustringThe text to look in.
hotKeySpecifier
RuneThe hotkey specifier (e.g. '_') to look for.
firstUpperCase
boolIf
true
the legacy behavior of identifying the first upper case character as the hotkey will be enabled. Regardless of the value of this parameter,hotKeySpecifier
takes precedence.hotPos
intOutputs the Rune index into
text
.hotKey
KeyOutputs the hotKey.
Returns
- bool
true
if a hotkey was found;false
otherwise.