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

9
LINES

< > BotCompany Repo | #1010997 // parseSecondInt - parse second int in string (or return 0)

JavaX fragment (include)

static int parseSecondInt(String s) {
  L<S> tok = javaTokC(s);
  int i = 0;
  while (i < l(tok) && !isInteger(tok.get(i))) ++i;
  ++i;
  while (i < l(tok) && !isInteger(tok.get(i))) ++i;
  if (i < l(tok)) ret parseInt(tok.get(i));
  ret 0;
}

Author comment

Began life as a copy of #1004323

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1010997
Snippet name: parseSecondInt - parse second int in string (or return 0)
Eternal ID of this version: #1010997/1
Text MD5: 4dab7b6366a3f677462cc117b075aae8
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-11 03:25:16
Source code size: 250 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 376 / 436
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1011288 - parseSecondLong - parse second long in string (or return 0)