Libraryless. Click here for Pure Java version (10692L/60K).
1 | // index returned is N index that contains '\n' (or last N) |
2 | static int tok_findEndOfLine(LS tok, int i) { |
3 | int n = l(tok); |
4 | if (odd(i)) ++i; // Point to N token |
5 | while (i < n) { |
6 | S t = tok.get(i); |
7 | if (containsNewLine(t)) |
8 | ret i; |
9 | i += 2; |
10 | } |
11 | ret n-1; |
12 | } |
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: | 130 / 200 |
Version history: | 2 change(s) |
Referenced in: | [show references] |