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   

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

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: 99 / 118
Referenced in: [show references]

Formerly at http://tinybrain.de/1018708 & http://1018708.tinybrain.de