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

3
LINES

< > BotCompany Repo | #1009168 // charAt - safe version of String.charAt (returns \0 if out of range or string is null)

JavaX fragment (include)

static char charAt(S s, int i) {
  ret s != null && i >= 0 && i < s.length() ? s.charAt(i) : '\0';
}

download  show line numbers  debug dex  old transpilations   

Travelled to 22 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, eiwvkucnqnjw, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, ofpaelxlmzfo, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, skddmizpvtmy, snaazhdonpnp, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1009168
Snippet name: charAt - safe version of String.charAt (returns \0 if out of range or string is null)
Eternal ID of this version: #1009168/1
Text MD5: 4768ad1832d17bba0d537b507755ee81
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-12 13:14:47
Source code size: 102 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 664 / 2117
Referenced in: [show references]