Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1015728 // jmenu_autoMnemonic - extract mnemonic in the form of e.g. "&Translate"

JavaX fragment (include)

1  
static Pair<S, Int> jmenu_autoMnemonic(S s) {
2  
  int i = indexOf(s, '&');
3  
  if (i >= 0 && i < l(s) && isLetterOrDigit(s.charAt(i+1)))
4  
    ret pair(substring(s, 0, i) + substring(s, i+1), (int) s.charAt(i+1));
5  
  ret pair(s, 0);
6  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015728
Snippet name: jmenu_autoMnemonic - extract mnemonic in the form of e.g. "&Translate"
Eternal ID of this version: #1015728/2
Text MD5: f98f4e86229585dc3a4d61817f94bb6c
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-26 13:32:52
Source code size: 232 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 386 / 436
Version history: 1 change(s)
Referenced in: [show references]