static bool tok_sameTest(L<S> tok, S text) { int iTok = 0, iText = 0, nTok = l(tok), nText = l(text); while (iTok < nTok) { S t = tok.get(iTok++); int n = l(t); if (n == 0) continue; if (!t.regionMatches(0, text, iText, n)) false; iText += n; } ret iText == nText; }
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: | #1010088 |
Snippet name: | tok_sameTest - compare list of tokens with joined text |
Eternal ID of this version: | #1010088/1 |
Text MD5: | 8596171fd567067041b45c076e8765a8 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-02 10:05:05 |
Source code size: | 304 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 498 / 486 |
Referenced in: | [show references] |