public static String rtrim(String s) {
  int i = s.length();
  while (i > 0 && (s.charAt(i-1) == ' ' || s.charAt(i-1) == '\t'))
    --i;
  return i < s.length() ? s.substring(0, i) : s;
}Snippet is not live.
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #2000477 | 
| Snippet name: | rtrim | 
| Eternal ID of this version: | #2000477/1 | 
| Text MD5: | 9e2d3cefc334daeedc1c75b37158ecfc | 
| Author: | stefan | 
| Category: | |
| Type: | New Tinybrain snippet | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2015-08-01 18:41:32 | 
| Source code size: | 192 bytes / 6 lines | 
| Pitched / IR pitched: | No / Yes | 
| Views / Downloads: | 867 / 241 | 
| Referenced in: | [show references] |