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

7
LINES

< > BotCompany Repo | #1013277 // dropAnyPrefix - quits after first prefix found

JavaX fragment (include)

1  
static S dropAnyPrefix(S s, S... prefixes) {
2  
  if (nempty(s))
3  
    for (S prefix : prefixes)
4  
      if (startsWith(s, prefix))
5  
        ret substring(s, l(prefix));
6  
  ret s;
7  
}

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: #1013277
Snippet name: dropAnyPrefix - quits after first prefix found
Eternal ID of this version: #1013277/1
Text MD5: 67471b229259cc85ecea83985f825ae0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-31 06:23:48
Source code size: 178 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 491 / 500
Referenced in: [show references]