Method FindHotKey
FindHotKey(string, Rune, out int, out Key, bool)
Finds the HotKey and its location in text.
public static bool FindHotKey(string text, Rune hotKeySpecifier, out int hotPos, out Key hotKey, bool firstUpperCase = false)
Parameters
textstringThe text to look in.
hotKeySpecifierRuneThe HotKey specifier (e.g. '_') to look for.
hotPosintOutputs the Rune index into
text.hotKeyKeyOutputs the hotKey. Empty if not found.
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. Defaults to false.
Returns
- bool
trueif a HotKey was found;falseotherwise.