1 | static IntRange antitrim(S s, int start, int end) { |
2 | while (start > 0 && isSpace(s.charAt(start-1))) --start; |
3 | while (end < l(s) && isSpace(s.charAt(end))) ++end; |
4 | ret intRange(start, end); |
5 | } |
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: | 314 / 345 |
Version history: | 2 change(s) |
Referenced in: | [show references] |