Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1018708 // dropExtension - get file's base name

JavaX fragment (include)

1  
static File dropExtension(File f) {
2  
  ret f == null ? null : fileInSameDir(f, dropExtension(f.getName()));
3  
}
4  
5  
sS dropExtension(S s) {
6  
  ret takeFirst(s, smartLastIndexOf(s, '.'));
7  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018708
Snippet name: dropExtension - get file's base name
Eternal ID of this version: #1018708/1
Text MD5: ec1061efc1f88745ab3af063e81ade34
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-11 17:12:14
Source code size: 187 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 296 / 356
Referenced in: [show references]