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).

1  
sbool swicEwic_trim(S s, S prefix, S suffix) {
2  
  ret swic(s, prefix) && ewic(s, suffix);
3  
}
4  
5  
sbool swicEwic_trim(S s, S prefix, S suffix, Matches m) {
6  
  if (!swicEwic(s, prefix, suffix)) false;
7  
  if (m != null)
8  
    m.m = new S[] {trimSubstring(s, l(prefix), l(s)-l(suffix))};
9  
  true;
10  
}

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