1 | static S fileExtension(File f) {
|
2 | if (f == null) null; |
3 | ret fileExtension(f.getName()); |
4 | } |
5 | |
6 | static S fileExtension(S s) {
|
7 | ret substring(s, smartLastIndexOf(s, '.')); |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney
No comments. add comment
| Snippet ID: | #1015294 |
| Snippet name: | fileExtension - including dot. uses only last extension if there are multiple |
| Eternal ID of this version: | #1015294/5 |
| Text MD5: | 54247dbc04b4c92ae91ef3928eedc980 |
| Author: | stefan |
| Category: | javax / io |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-05-29 21:48:01 |
| Source code size: | 177 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 674 / 717 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |