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

6
LINES

< > BotCompany Repo | #1025779 // getIndentOfLine - detect indent. doesn't handle tabs

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2133L/14K).

1  
static int getIndentOfLine(S s) {
2  
  int i = 0, n = l(s);
3  
  while (i < n && s.charAt(i) == ' ')
4  
    ++i;
5  
  ret i;
6  
}

Author comment

Began life as a copy of #1002854

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025779
Snippet name: getIndentOfLine - detect indent. doesn't handle tabs
Eternal ID of this version: #1025779/1
Text MD5: 757137bf922c744b19f26be5cb2d51ac
Transpilation MD5: ea9ecee841cb4e275aea9b7189500f22
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:58
Source code size: 121 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 229 / 470
Referenced in: [show references]