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

12
LINES

< > BotCompany Repo | #1017876 // CombinedStringMatcher

JavaX fragment (include)

sclass CombinedStringMatcher extends StringMatcher {
  new L<StringMatcher> matchers;
  
  *() {}
  *(StringMatcher... matchers) { addAll(this.matchers, matchers); }
  
  bool match(S pat, S input, SS matches) {
    for (StringMatcher m : matchers)
      if (m.match(pat, input, matches)) true;
    false;
  }
}

Author comment

Began life as a copy of #1017696

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017876
Snippet name: CombinedStringMatcher
Eternal ID of this version: #1017876/4
Text MD5: edd3b83651fd8008f11d2d4b272c3d00
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-18 23:31:23
Source code size: 322 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 367 / 910
Version history: 3 change(s)
Referenced in: #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)