master/library/data/strings.retro
| 0c0cded41dbdd216605fa0ac3a5371241d91b640 | 4de7dc8b06074dcb1bc12a1972161c17bc80f773 | ||
|---|---|---|---|
1 | ( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) | 1 | ( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) |
2 | ( String Manipulation ) | 2 | ( String Manipulation ) |
3 | ( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) | 3 | ( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) |
4 | ( Copyright [c] 2009, Luke Parrish ) | 4 | ( Copyright [c] 2009 - 2010, Luke Parrish ) |
5 | ( Copyright [c] 2010, Marc Simpson ) | 5 | ( Copyright [c] 2010, Marc Simpson ) |
6 | ( License: ISC ) | 6 | ( License: ISC ) |
7 | ( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) | 7 | ( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) |
... | ... | ||
73 | dup 0 =if rdrop 2drop 0 ;then | 73 | dup 0 =if rdrop 2drop 0 ;then |
74 | r =if rdrop 1- ;then | 74 | r =if rdrop 1- ;then |
75 | again ; | 75 | again ; |
76 | |||
77 | ( Trim trailing spaces from a string ~~~~~~~~~~~~~~~~~~~~~~~~ ) | ||
78 | : chomp ( $-$ ) | ||
79 | dup dup getLength + 1- | ||
80 | dup @ 32 =if 0 swap ! heap -- dup 1- -- chomp ;then drop ; |
Download diff