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)

static int parseInt(S s) {
  ret emptyString(s) ? 0 : Integer.parseInt(s);
}

static int parseInt(char c) {
  return Integer.parseInt(str(c));
}

download  show line numbers  debug dex   

Travelled to 15 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lnbujpyubztb, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, sawdedvomwva, tslmcundralx, tvejysmllsmz, 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: 494 / 5685
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1000811 & http://1000811.tinybrain.de