1 | static boolean find3plusRests(S pat, S s) {
|
2 | return find3plusRests(pat, s, null); |
3 | } |
4 | |
5 | static boolean find3plusRests(S pat, S s, Matches matches) {
|
6 | L<S> tokpat = parse3(pat), toks = parse3(s); |
7 | Pair<S[], Int> p = find2plusIndex(tokpat, toks); |
8 | //print(structure(tokpat) + " on " + structure(toks) + " => " + structure(m)); |
9 | if (p == null) false; |
10 | if (matches != null) |
11 | matches.m = concatStringArrays( |
12 | new S[] {joinSubList(toks, 0, p.b-1)},
|
13 | p.a, |
14 | new S[] {joinSubList(toks, p.b+l(tokpat)-1)});
|
15 | true; |
16 | } |
Began life as a copy of #1001232
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: | #1014422 |
| Snippet name: | find3plusRests - returns beginning, inner matches, rest - note: drops punctuation! |
| Eternal ID of this version: | #1014422/6 |
| Text MD5: | 0f7c5f4df21bfecf878e00b788c0c547 |
| 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:16:05 |
| Source code size: | 542 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 604 / 644 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |