Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1017181 // joinedEquals

JavaX fragment (include)

1  
static bool joinedEquals(L<S> tok, S s) {
2  
  int idx = 0;
3  
  for (S t : tok) {
4  
    if (!regionMatches(t, 0, s, idx, l(t))) false;
5  
    idx += l(t);
6  
  }
7  
  ret idx == l(s);
8  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017181
Snippet name: joinedEquals
Eternal ID of this version: #1017181/1
Text MD5: 1253442b749f7835db7f448a9e91e5fb
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-13 17:25:35
Source code size: 176 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 395 / 429
Referenced in: [show references]