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

4
LINES

< > BotCompany Repo | #1027196 // replacePrefixIC - replace string prefix if there

JavaX fragment (include)

sS replacePrefixIC(S prefix, S replacement, S s) {
  if (!swic(s, prefix)) ret s;
  ret replacement + substring(s, l(prefix));
}

Author comment

Began life as a copy of #1007915

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: #1027196
Snippet name: replacePrefixIC - replace string prefix if there
Eternal ID of this version: #1027196/1
Text MD5: 487da3f515b0a6bec2d1dc9ab916fd22
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-24 22:28:58
Source code size: 131 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 102 / 135
Referenced in: [show references]