1 | static boolean find3plusRestsX(S pat, S s) { |
2 | return find3plusRestsX(pat, s, null); |
3 | } |
4 | |
5 | static boolean find3plusRestsX(S pat, S s, Matches matches) { |
6 | pat = dropPrefix("...", dropSuffix("...", pat)); |
7 | L<S> tokpat = parse3(pat), toks = parse3(s); |
8 | Pair<S[], Int> p = find2plusIndex(tokpat, toks); |
9 | //print(structure(tokpat) + " on " + structure(toks) + " => " + structure(m)); |
10 | if (p == null) false; |
11 | if (matches != null) |
12 | matches.m = concatStringArrays( |
13 | new S[] {joinSubList(toks, 0, p.b-1)}, |
14 | p.a, |
15 | new S[] {joinSubList(toks, p.b+l(tokpat)-1)}); |
16 | true; |
17 | } |
Began life as a copy of #1014422
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014428 |
Snippet name: | find3plusRestsX |
Eternal ID of this version: | #1014428/1 |
Text MD5: | b64ff2ab19f481d9e593043475c1844f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-21 17:30:18 |
Source code size: | 597 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 383 / 414 |
Referenced in: | [show references] |