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

11
LINES

< > BotCompany Repo | #1003855 // matchOneOf

JavaX fragment (include)

// patterns last so we can use var args
static bool matchOneOf(S s, Matches m, S... pats) {
  for (S pat : pats)
    if (match(pat, s, m))
      true;
  false;
}

static bool matchOneOf(S s, S... pats) {
  ret matchOneOf(s, null, pats);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003855
Snippet name: matchOneOf
Eternal ID of this version: #1003855/1
Text MD5: 9c8c8ad97184cfc09b989764d0f736ee
Author: stefan
Category: javax / talking robots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-28 17:38:07
Source code size: 248 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 580 / 593
Referenced in: [show references]