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

8
LINES

< > BotCompany Repo | #1036937 // betterAutoUnindent

JavaX fragment (include)

1  
sS betterAutoUnindent(S s) {
2  
  int n = betterGetIndent(s);
3  
  if (n == 0) ret s;
4  
  L<S> l = toLines(s);
5  
  for (int i = 0; i < l(l); i++)
6  
    l.set(i, substring(l.get(i), n));
7  
  ret fromLines(l);
8  
}

Author comment

Began life as a copy of #1002853

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036937
Snippet name: betterAutoUnindent
Eternal ID of this version: #1036937/1
Text MD5: 143552739fbdefd6f7bd5545dd591902
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-07-24 21:35:03
Source code size: 202 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 116 / 143
Referenced in: [show references]