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

9
LINES

< > BotCompany Repo | #1005649 // dropSuffixTrim - short for dropSuffixAndTrim + extension

JavaX fragment (include)

1  
static S dropSuffixTrim(S suffix, S s) {
2  
  ret dropSuffixAndTrim(suffix, s);
3  
}
4  
5  
static bool dropSuffixTrim(S suffix, S s, Matches m) {
6  
  if (!endsWith(s, suffix)) false;
7  
  m.m = new S[] { dropLast(l(suffix), s) };
8  
  true;
9  
}

Author comment

Began life as a copy of #1003799

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005649
Snippet name: dropSuffixTrim - short for dropSuffixAndTrim + extension
Eternal ID of this version: #1005649/3
Text MD5: ba8a3843dbac08b6ad591f12cde8303d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-21 17:31:29
Source code size: 231 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 518 / 562
Version history: 2 change(s)
Referenced in: [show references]