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   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

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: 14 / 27
Version history: 1 change(s)
Referenced in: [show references]