static File replaceExtension(File f, S extOld, S extNew) { ret newFile(replaceExtension(f2s(f), extOld, extNew)); } static File replaceExtension(File f, S extNew) { ret replaceExtension(f, fileExtension(f), extNew); } static S replaceExtension(S s, S extOld, S extNew) { s = dropSuffixIC(addPrefixOptIfNempty(".", extOld), s); ret s + addPrefixOptIfNempty(".", extNew); } static S replaceExtension(S name, S extNew) { ret replaceExtension(name, fileExtension(name), extNew); }
Began life as a copy of #1011103
download show line numbers debug dex old transpilations
Travelled to 19 computer(s): aoiabmzegqzx, ayivmpnvhhik, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1013805 |
| Snippet name: | replaceExtension |
| Eternal ID of this version: | #1013805/10 |
| Text MD5: | acf1b36c10f22f545cb095182f841fc9 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-27 22:04:59 |
| Source code size: | 504 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 884 / 1942 |
| Version history: | 9 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1015293 - changeExtension |