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

3
LINES

< > BotCompany Repo | #1006528 // parseIntOpt - return 0 on non-int

JavaX fragment (include)

static int parseIntOpt(S s, int defValue default 0) {
  ret isInteger(s) ? parseInt(s) : defValue;
}

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: #1006528
Snippet name: parseIntOpt - return 0 on non-int
Eternal ID of this version: #1006528/2
Text MD5: 5d664068ae1b08b69cc137f2e5b099e8
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-05 19:03:14
Source code size: 102 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 584 / 614
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)