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

6
LINES

< > BotCompany Repo | #1009252 // dropPrefixSuffix_orNull

JavaX fragment (include)

static S dropPrefixSuffix_orNull(S prefix, S suffix, S s) {
  if (!startsWith(s, prefix)) null;
  s = dropPrefix(prefix, s);
  if (!endsWith(s, suffix)) null;
  ret dropSuffix(suffix, s);
}

Author comment

Began life as a copy of #1009250

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009252
Snippet name: dropPrefixSuffix_orNull
Eternal ID of this version: #1009252/1
Text MD5: b0e3e363dd4a1c150b4f94f9f2e0d427
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-19 20:10:46
Source code size: 194 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 468 / 503
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)