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

8
LINES

< > BotCompany Repo | #1026018 // mmo_match - superseded by mmo_match_parsedPattern/mmo_match2

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3106L/20K).

// patterns = e.g. "Zitat, Anfrage, Preis, Kosten, Preise, Geld, wieviel, wie + viel"
sbool mmo_match(S patterns, S s) {
  S s2 = trim(s);
  for (S pat : tok_splitAtComma(patterns))
    if (all(tok_splitAtPlus(pat), p -> startsWith(p, "#") ? eqic(p, s2) : find3(p, s2)))
      true;
  false;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1026018
Snippet name: mmo_match - superseded by mmo_match_parsedPattern/mmo_match2
Eternal ID of this version: #1026018/6
Text MD5: 61bfa6d8448857c82680a2dc66eaf118
Transpilation MD5: 94c54e44b13c29f61d1cd823d4ad9ccd
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-16 13:56:15
Source code size: 300 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 163 / 257
Version history: 5 change(s)
Referenced in: [show references]