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

8
LINES

< > BotCompany Repo | #1008634 // charToTokenIndex_right

JavaX fragment (include)

static int charToTokenIndex_right(L<S> tok, int charIndex) {
  int i = 0, idx = 0;
  while (i < l(tok) && idx < charIndex) {
    idx += l(tok.get(i));
    i++;
  }
  ret i;
}

Author comment

Began life as a copy of #1008633

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: #1008634
Snippet name: charToTokenIndex_right
Eternal ID of this version: #1008634/1
Text MD5: 37922bb0f8c0dfa618aa994ede6b98a7
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-26 16:23:33
Source code size: 181 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 523 / 554
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)