aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/forth2012/string/trailing.frt
blob: 51e709d0127366066d01b5f25f75a8aaf208f7be (plain)
1
2
3
4
5
6
7
8
9
10


: -trailing  ( c_addr u1 -- c_addr u2 ) \ string dash-trailing
\ Adjust the string specified by {c-addr, u1} to remove all
\ trailing spaces. {u2} is the length of the modified string.
    begin
	dup
    while
	1- 2dup + c@ bl <>
    until  1+  then ;