static S dropFrom(S s, S x) { if (s == null) null; int i = s.indexOf(x); if (i < 0) ret s; ret substring(s, 0, i); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1004390 |
| Snippet name: | dropFrom - drop rest of string from a certain substring (or leave unchanged if substring not found) |
| Eternal ID of this version: | #1004390/1 |
| Text MD5: | d49cb6af43c02588bb8771639da6ab44 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-08-15 15:11:06 |
| Source code size: | 129 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 827 / 832 |
| Referenced in: | #1005739 - dropIncluding - drop beginning of string until (an including) a certain substring (or return "" if not found) #1006654 - Standard functions list 2 (LIVE, continuation of #761) |