static boolean find3plusRests(S pat, S s) { return find3plusRests(pat, s, null); } static boolean find3plusRests(S pat, S s, Matches matches) { L<S> tokpat = parse3(pat), toks = parse3(s); Pair<S[], Int> p = find2plusIndex(tokpat, toks); //print(structure(tokpat) + " on " + structure(toks) + " => " + structure(m)); if (p == null) false; if (matches != null) matches.m = concatStringArrays( new S[] {joinSubList(toks, 0, p.b-1)}, p.a, new S[] {joinSubList(toks, p.b+l(tokpat)-1)}); true; }
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: | 333 / 373 |
Version history: | 5 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1014425 - getFind3plusRests - returns beginning, inner matches, rest - note: drops punctuation! #1014428 - find3plusRestsX |