Libraryless. Click here for Pure Java version (1721L/11K).
1 | static IntRange tok_findNextEmptyLineWhitespace(S s, int i) { |
2 | char c; |
3 | int k = i, l = l(s); |
4 | |
5 | while (k < l) { |
6 | int j = k, breaks = 0; |
7 | while (j < l && isSpace(c = s.charAt(j))) { |
8 | ++j; |
9 | if (c == '\n') ++breaks; |
10 | } |
11 | if (breaks >= 2) ret intRange(k, j); |
12 | while (j < l && !isSpace(s.charAt(j))) ++j; |
13 | k = j; |
14 | } |
15 | |
16 | null; |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023726 |
Snippet name: | tok_findNextEmptyLineWhitespace |
Eternal ID of this version: | #1023726/3 |
Text MD5: | 366865fe4d1563988a5e833b00eb01d8 |
Transpilation MD5: | 9245d8e3853a231f3a3ba3c232d5776d |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-07 18:16:22 |
Source code size: | 371 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 144 / 223 |
Version history: | 2 change(s) |
Referenced in: | [show references] |