static S replacePartBetweenStrings(S s, S begin, S end, S replacement) { if (s == null) null; int i = indexOf(s, begin); if (i < 0) ret s; i += l(begin); int j = indexOf(s, i, end); if (j < 0) ret s; ret substring(s, 0, i) + replacement + substring(s, j); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1012263 |
| Snippet name: | replacePartBetweenStrings |
| Eternal ID of this version: | #1012263/1 |
| Text MD5: | 227ec5f7b93a873ebab378068702b9ac |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-11-26 19:21:21 |
| Source code size: | 279 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 696 / 724 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1012558 - replaceSubstring #1013908 - partBetweenStrings |