public static char getMnemonic ( String label ) { int mnemonicPos = label . indexOf ( ' ' ) ; while ( mnemonicPos != - 1 && mnemonicPos == label . indexOf ( "&&" ) && mnemonicPos < label . length ( ) ) { mnemonicPos = label . indexOf ( ' ' , mnemonicPos + 2 ) ; } if ( mnemonicPos == - 1 || mnemonicPos == label . length ( ) ) { return ' ' ; } return label . charAt ( mnemonicPos + 1 ) ; }
Returns mnemonic of a UI element .