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

7
LINES

< > BotCompany Repo | #1014447 // parseLastInt - parse last int in string (or return 0)

JavaX fragment (include)

1  
static int parseFirstInt(String s) {
2  
  L<S> tok = javaTokC(s);
3  
  for (int i = l(tok)-1; i >= 0; i--)
4  
    if (isInteger(tok.get(i)))
5  
      ret parseInt(tok.get(i));
6  
  ret 0;
7  
}

Author comment

Began life as a copy of #1004323

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: #1014447
Snippet name: parseLastInt - parse last int in string (or return 0)
Eternal ID of this version: #1014447/1
Text MD5: 080be40ad7d6336d77ede7c00e3c1d64
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-21 19:11:11
Source code size: 180 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 316 / 346
Referenced in: [show references]