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

7
LINES

< > BotCompany Repo | #1016313 // fileExtensionWithoutDot

JavaX fragment (include)

static S fileExtensionWithoutDot(File f) {
  ret f == null ? null : fileExtensionWithoutDot(f.getName());
}

static S fileExtensionWithoutDot(S s) {
  ret substring(s, smartLastIndexOf(s, '.')+1);
}

Author comment

Began life as a copy of #1015294

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016313
Snippet name: fileExtensionWithoutDot
Eternal ID of this version: #1016313/1
Text MD5: 41a2fa49a6be7f7b57a5175ebc6a5040
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-14 11:23:33
Source code size: 204 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 387 / 425
Referenced in: [show references]