1 | static S actuallyDropSuffix(S suffix, S s) {
|
2 | if (!endsWith(s, suffix)) |
3 | fail("Can't drop suffix: " + quote(suffix) + " from " + quote(s));
|
4 | ret substring(s, 0, l(s)-l(suffix)); |
5 | } |
Began life as a copy of #1002048
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: | #1013609 |
| Snippet name: | actuallyDropSuffix - fails when suffix not there |
| Eternal ID of this version: | #1013609/2 |
| Text MD5: | dbeb91a9081810566a5d6b2394c64332 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-01-11 14:29:54 |
| Source code size: | 188 bytes / 5 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 685 / 750 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |