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

7
LINES

< > BotCompany Repo | #1024416 // angleBracketVarsToEllipsis

JavaX fragment (include)

// e.g. "I am <vague height>" to "I am ..."
sS angleBracketVarsToEllipsis(S s) {
  LS tok = javaTokWithAngleBrackets(s);
  for (int idx : indicesOfAngleBracketVars(tok))
    tok.set(idx, "...");
  ret join(tok);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1024416
Snippet name: angleBracketVarsToEllipsis
Eternal ID of this version: #1024416/2
Text MD5: 84b3ba8aa3d62b695f1cf9dd628400a1
Author: stefan
Category: javax / tokenizing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-11 14:15:31
Source code size: 219 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 281 / 333
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1025716 - containsAngleBracketVars
#1025717 - angleBracketVarsToStars