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

7
LINES

< > BotCompany Repo | #1028605 // replaceCurlyBracedWith

JavaX fragment (include)

sS replaceCurlyBracedWith(S s, S replacement) {
  ret join(replaceCurlyBracedWith(javaTokWithAllBrackets_cached(s), replacement));
}

static LS replaceCurlyBracedWith(LS tok, S replacement) {
  ret mapCodeTokens(t -> isCurlyBraced_simple(t) ? replacement : t, tok);
}

Author comment

Began life as a copy of #1028371

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1028605
Snippet name: replaceCurlyBracedWith
Eternal ID of this version: #1028605/2
Text MD5: b1a2e1d6d8e6c5c957ed856928bc1a1a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-28 16:01:01
Source code size: 273 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 96 / 135
Version history: 1 change(s)
Referenced in: [show references]