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

6
LINES

< > BotCompany Repo | #1001553 // dropPrefixMandatory

JavaX fragment (include)

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

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: 708 / 1374
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)