Libraryless. Click here for Pure Java version (2137L/14K).
static int endOfLeadingInteger(S s) { if (empty(s)) ret 0; int start = 0; if (s.charAt(0) == '-') ++start; int i = start; while (i < l(s) && isDigit(s.charAt(i))) ++i; ret i > start ? i : 0; }
Began life as a copy of #1013527
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026682 |
Snippet name: | endOfLeadingInteger (or 0) |
Eternal ID of this version: | #1026682/1 |
Text MD5: | f802e9ef3e366b0a1851d96b91cbf4a7 |
Transpilation MD5: | 0578cc0e4010adcc44f3a65505dbb97e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-18 23:14:52 |
Source code size: | 211 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 196 / 259 |
Referenced in: | [show references] |