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

11
LINES

< > BotCompany Repo | #1003855 // matchOneOf

JavaX fragment (include)

1  
// patterns last so we can use var args
2  
static bool matchOneOf(S s, Matches m, S... pats) {
3  
  for (S pat : pats)
4  
    if (match(pat, s, m))
5  
      true;
6  
  false;
7  
}
8  
9  
static bool matchOneOf(S s, S... pats) {
10  
  ret matchOneOf(s, null, pats);
11  
}

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