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


< > 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
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: 352 / 720
Referenced in: [show references]