Libraryless. Click here for Pure Java version (2524L/16K).
1 | static int countLeadingSpaces(String s) { |
2 | int i = 0, n = l(s); |
3 | while (i < n && (s.charAt(i) == ' ' || s.charAt(i) == '\t')) |
4 | ++i; |
5 | ret i; |
6 | } |
Began life as a copy of #1001543
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: | #1013628 |
Snippet name: | countLeadingSpaces - also tabs |
Eternal ID of this version: | #1013628/4 |
Text MD5: | 2496f9e940b040fb7c0b459e53f50715 |
Transpilation MD5: | c78396ddc3955f2fe0dcc6f2b9ffa745 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-12-05 16:39:22 |
Source code size: | 152 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 346 / 447 |
Version history: | 3 change(s) |
Referenced in: | [show references] |