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

8
LINES

< > BotCompany Repo | #1028932 // ai_splitOffWordSuffixes

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2885L/18K).

1  
sS ai_splitOffWordSuffixes(Set<S> suffixes, S input) {
2  
  ret mapCodeTokens_javaTok(input, s -> {
3  
    fOr (S suffix : suffixes)
4  
      if (ewic_notSame(s, suffix))
5  
        ret insertSpaceAt(s, l(s)-l(suffix));
6  
    ret s;
7  
  });
8  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028932
Snippet name: ai_splitOffWordSuffixes
Eternal ID of this version: #1028932/2
Text MD5: c9f3a80135377cc26c4fc7166a406526
Transpilation MD5: c5ff5432db0cecf94ae465e8c46bb299
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-12 12:56:01
Source code size: 233 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 162 / 242
Version history: 1 change(s)
Referenced in: [show references]