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

4
LINES

< > BotCompany Repo | #1031488 // splitAtLastSpace

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

Libraryless. Click here for Pure Java version (2823L/17K).

1  
static PairS splitAtLastSpace(S s) {
2  
  int i = lastIndexOf(s, ' ');
3  
  ret i < 0 ? null : pair(trimSubstring(s, 0, i), trimSubstring(s, i+1));
4  
}

Author comment

Began life as a copy of #1021064

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031488
Snippet name: splitAtLastSpace
Eternal ID of this version: #1031488/1
Text MD5: d15f717c7fe1f43c01640393968fecfb
Transpilation MD5: b9eb1dbfeda069e168c80a2d0a18f58e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-14 15:45:15
Source code size: 146 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 183 / 241
Referenced in: [show references]