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

6
LINES

< > BotCompany Repo | #1001553 // dropPrefixMandatory

JavaX fragment (include)

1  
static String dropPrefixMandatory(String prefix, String s) {
2  
  if (s.startsWith(prefix))
3  
    return s.substring(prefix.length());
4  
  else
5  
    throw fail("Prefix " + prefix + " not found in: " + s);
6  
}

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: #1001553
Snippet name: dropPrefixMandatory
Eternal ID of this version: #1001553/1
Text MD5: 24840749e623f6216771f24646cdcb09
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-24 15:33:40
Source code size: 205 bytes / 6 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 710 / 1378
Referenced in: [show references]