1 | static L<S> words2_notNextToNumbers(S s) { |
2 | new L<S> l; |
3 | int n = l(s); |
4 | for (int i = 0; i < n; ) { |
5 | if (isDigit(s.charAt(i))) continue with ++i; |
6 | int j = i; |
7 | while (j < n && isLetter(s.charAt(j))) |
8 | ++j; |
9 | if (j < n && isDigit(s.charAt(j))) continue with i = j; |
10 | if (j > i) l.add(substring(s, i, j)); |
11 | while (j < n && !isLetter(s.charAt(j))) |
12 | ++j; |
13 | i = j; |
14 | } |
15 | ret l; |
16 | } |
Began life as a copy of #1016968
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: | #1016974 |
Snippet name: | words2_notNextToNumbers - deeply extract all words from string; filters out at least some of the hex strings |
Eternal ID of this version: | #1016974/4 |
Text MD5: | a6f02101ef029a3336a3cdaf0fc0ec7b |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-09 16:39:44 |
Source code size: | 417 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 347 / 393 |
Version history: | 3 change(s) |
Referenced in: | [show references] |