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

11
LINES

< > BotCompany Repo | #1003144 - indentx function - handles trailing \n better

JavaX fragment (include)

static S indentx(S s) {
  return indentx(indent_default, s);
}

static S indentx(int n, S s) {
  return dropSuffix(repeat(' ', n), indent(n, s));
}

static S indentx(S indent, S s) {
  return dropSuffix(indent, indent(indent, s));
}

Author comment

Began life as a copy of #1000672

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, sawdedvomwva, tslmcundralx, tvejysmllsmz, whxojlpjdney

No comments. add comment

Snippet ID: #1003144
Snippet name: indentx function - handles trailing \n better
Eternal ID of this version: #1003144/1
Text MD5: 6540d8a87e73e5ab0af3348dd1dc213a
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-10-26 17:52:14
Source code size: 242 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 363 / 733
Referenced in: [show references]

Formerly at http://tinybrain.de/1003144 & http://1003144.tinybrain.de