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

5
LINES

< > BotCompany Repo | #1034881 // replaceTokenWithSpace

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

Libraryless. Click here for Pure Java version (5143L/28K).

svoid replaceTokenWithSpace(LS tok, int i) {
  tokSet(tok, i,
    endsWithSpaceEtc(get(tok, i-1))
    || startsWithSpaceEtc(get(tok, i+1)) ? "" : " ");
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034881
Snippet name: replaceTokenWithSpace
Eternal ID of this version: #1034881/2
Text MD5: 18ae581091dfbd45ab9531b9d9e3dfb7
Transpilation MD5: 2d7f898f3324a0c7aee6f3a4715d424b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-12 23:59:50
Source code size: 157 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 134 / 199
Version history: 1 change(s)
Referenced in: [show references]