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

5
LINES

< > BotCompany Repo | #1014462 // antitrim - extend substring range while spaces

JavaX fragment (include)

static IntRange antitrim(S s, int start, int end) {
  while (start > 0 && isSpace(s.charAt(start-1))) --start;
  while (end < l(s) && isSpace(s.charAt(end))) ++end;
  ret intRange(start, end);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014462
Snippet name: antitrim - extend substring range while spaces
Eternal ID of this version: #1014462/3
Text MD5: 08bfe896a16f78315cd73a9bd77e3a75
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-22 01:23:21
Source code size: 198 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 243 / 269
Version history: 2 change(s)
Referenced in: [show references]