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

15
LINES

< > BotCompany Repo | #1014592 - matchX - select one of the matching functions (matchStartX, matchEndX, find3, match)

JavaX fragment (include)

static bool matchX(S pat, S s) {
  ret matchX(pat, s, null);
}

static bool matchX(S pat, S s, Matches m) {
  if (endsWith(pat, "...")) {
    pat = dropSuffixTrim("...", pat);
    if (startsWith(pat, "..."))
      ret find3(dropPrefixTrim("...", pat), s, m);
    else
      ret matchStart(pat, s, m);
  }      
  if (startsWith(pat, "...")) ret matchEndX(pat, s, m);
  ret match(pat, s, m);
}

download  show line numbers  debug dex   

Travelled to 9 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1014592
Snippet name: matchX - select one of the matching functions (matchStartX, matchEndX, find3, match)
Eternal ID of this version: #1014592/6
Text MD5: 4affb3b4f3d81b626bf4d3bc48c90847
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-16 16:32:23
Source code size: 406 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 182 / 200
Version history: 5 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1014592 & http://1014592.tinybrain.de