Libraryless. Click here for Pure Java version (2334L/15K).
static int getIndent(S s) { int n = Integer.MAX_VALUE; for (S l : toLines(s)) n = min(n, getIndentOfLine(l)); ret n; }
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: | #1002854 |
| Snippet name: | getIndent - detect indent |
| Eternal ID of this version: | #1002854/2 |
| Text MD5: | 9d0000b3bcd60c735c8f778a652ff1df |
| Transpilation MD5: | 76664117a4677af35932a003be402219 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-10-19 16:05:27 |
| Source code size: | 135 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1269 / 1432 |
| Version history: | 1 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1014204 - countIndent - synonym of getIndent - detect indent #1025779 - getIndentOfLine - detect indent. doesn't handle tabs #1036936 - betterGetIndent - getIndent + handling empty lines better #3000382 - Answer for ferdie (>> t = 1, f = 0) |