Libraryless. Click here for Pure Java version (10692L/60K).
// index returned is N index that contains '\n' (or last N) static int tok_findEndOfLine(LS tok, int i) { int n = l(tok); if (odd(i)) ++i; // Point to N token while (i < n) { S t = tok.get(i); if (containsNewLine(t)) ret i; i += 2; } ret n-1; }
Began life as a copy of #1025221
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1037240 |
Snippet name: | tok_findEndOfLine |
Eternal ID of this version: | #1037240/3 |
Text MD5: | 924a31d4cf42083e2c5380e80e282fe7 |
Transpilation MD5: | 84915b12a7f48c874e25bad7f20502ae |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2023-07-29 15:08:17 |
Source code size: | 283 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 128 / 196 |
Version history: | 2 change(s) |
Referenced in: | [show references] |