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)

static File dropExtension(File f) {
  ret f == null ? null : fileInSameDir(f, dropExtension(f.getName()));
}

sS dropExtension(S s) {
  ret takeFirst(s, smartLastIndexOf(s, '.'));
}

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: 295 / 354
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)