static bool singleEllipsisMatchIC(S pat, S s, Matches m) {
int i = indexOf(pat, "...");
if (i < 0) ret eqic(pat, s);
if (!regionMatchesIC(s, 0, pat, 0, i)) false;
int lSuffix = l(pat)-(i+3);
if (!regionMatchesIC(s, l(s)-lSuffix, pat, i+3, lSuffix)) false;
if (m != null)
m.m = new S[] {substring(s, i, l(s)-lSuffix)};
true;
}
static bool singleEllipsisMatchIC(S pat, S s) {
ret singleEllipsisMatchIC(pat, s, null);
}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: | #1012768 |
| Snippet name: | singleEllipsisMatchIC - match "bla ... bla" (case insensitive) |
| Eternal ID of this version: | #1012768/4 |
| Text MD5: | ab79be48d822eee9d860db286564ab35 |
| Author: | stefan |
| Category: | javax / parsing |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-12-13 01:16:41 |
| Source code size: | 450 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 919 / 904 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |