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
text
stringThe text to look in.
hotKeySpecifier
RuneThe HotKey specifier (e.g. '_') to look for.
hotPos
intOutputs the Rune index into
text
.hotKey
KeyOutputs the hotKey. Empty if not found.
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. Defaults to false.
Returns
- bool
true
if a HotKey was found;false
otherwise.