static S deleteFromTo(S s, S from, S to) { int i = s.indexOf(from); if (i < 0) ret s; int j = s.indexOf(to, i+l(from)); if (j < 0) ret s; ret s.substring(0, i) + s.substring(j+l(to)); }
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: | #1002784 |
Snippet name: | deleteFromTo - delete a part of a string |
Eternal ID of this version: | #1002784/1 |
Text MD5: | 21ca263ec126d1b18815baf71c0cabf2 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-02-24 01:22:41 |
Source code size: | 201 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 673 / 678 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #3000382 - Answer for ferdie (>> t = 1, f = 0) |