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

10
LINES

< > BotCompany Repo | #1026732 // swicEwic_trim - trims matches

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2438L/15K).

sbool swicEwic_trim(S s, S prefix, S suffix) {
  ret swic(s, prefix) && ewic(s, suffix);
}

sbool swicEwic_trim(S s, S prefix, S suffix, Matches m) {
  if (!swicEwic(s, prefix, suffix)) false;
  if (m != null)
    m.m = new S[] {trimSubstring(s, l(prefix), l(s)-l(suffix))};
  true;
}

Author comment

Began life as a copy of #1012994

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026732
Snippet name: swicEwic_trim - trims matches
Eternal ID of this version: #1026732/1
Text MD5: 4e76b9818892b0aef0765cc701fe945d
Transpilation MD5: 10d6bdaf1e91b09ec4c7abcfe25302c1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-19 21:06:38
Source code size: 293 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 86 / 132
Referenced in: [show references]