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

14
LINES

< > BotCompany Repo | #1016968 // words2_noNumbers - deeply extract all words from string

JavaX fragment (include)

static L<S> words2_noNumbers(S s) {
  new L<S> l;
  int n = l(s);
  for (int i = 0; i < n; ) {
    int j = i;
    while (j < n && isLetter(s.charAt(j)))
      ++j;
    if (j > i) l.add(substring(s, i, j));
    while (j < n && !isLetter(s.charAt(j)))
      ++j;
    i = j;
  }
  ret l;
}

Author comment

Began life as a copy of #1008045

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: #1016968
Snippet name: words2_noNumbers - deeply extract all words from string
Eternal ID of this version: #1016968/1
Text MD5: f467c3f9f6e7ab3b250b6ae2482fd912
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 15:59:17
Source code size: 299 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 433 / 483
Referenced in: [show references]