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

8
LINES

< > BotCompany Repo | #1021388 // tok_splitAtPlusAtBeginningOfLine

JavaX fragment (include)

static LS tok_splitAtPlusAtBeginningOfLine(S s) {
  new L<Int> indices;
  LS tok = javaTokWithAllBrackets_cached(s);
  for (int i = 1; i < l(tok); i += 2)
    if (eqGet(tok, i, "+") && containsNewLine(get(tok, i-1)))
      indices.add(i);
  ret splitAtTokenIndices(tok, indices);
}

Author comment

Began life as a copy of #1021386

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1021388
Snippet name: tok_splitAtPlusAtBeginningOfLine
Eternal ID of this version: #1021388/3
Text MD5: 81aa4da7fa4adf0d01601e971b006af6
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-17 14:47:47
Source code size: 288 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 251 / 296
Version history: 2 change(s)
Referenced in: [show references]