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

7
LINES

< > BotCompany Repo | #1000811 // parseInt - returns 0 on "" or null

JavaX fragment (include)

1  
static int parseInt(S s) {
2  
  ret emptyString(s) ? 0 : Integer.parseInt(s);
3  
}
4  
5  
static int parseInt(char c) {
6  
  return Integer.parseInt(str(c));
7  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 20 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lnbujpyubztb, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1000811
Snippet name: parseInt - returns 0 on "" or null
Eternal ID of this version: #1000811/4
Text MD5: 98362b345f6ec88f57a132b4cefd395e
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-10-03 13:25:47
Source code size: 150 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 819 / 6118
Version history: 3 change(s)
Referenced in: [show references]