17.6.1.0170
-TRAILING
dash-trailing
STRING
(
c-addr u
1
--
c-addr u
2
)
If
u
1
is greater than zero,
u
2
is equal to
u
1
less the number of spaces at the end of the character string specified by
c-addr u
1
. If
u
1
is zero or the entire string consists of spaces,
u
2
is zero.
Testing:
T{
:
s8
S"
abc "
;
-> }T
T{
:
s9
S"
"
;
-> }T
T{
:
s10
S"
a "
;
-> }T
T{ s1
-TRAILING
-> s1 }T
\
"
abcdefghijklmnopqrstuvwxyz
"
T{ s8
-TRAILING
-> s8 2 - }T
\
"
abc
"
T{ s7
-TRAILING
-> s7 }T
\
"
"
T{ s9
-TRAILING
-> s9
DROP
0 }T
\
"
"
T{ s10
-TRAILING
-> s10 1- }T
\
"
a
"
Forth 2012
Forth 2012
String word set
Foreword
Proposals Process
200
x
Membership
Introduction
Terms, notation, and references
Usage requirements
Documentation requirements
Compliance and labeling
Glossary
Block word set
Double-Number word set
Exception word set
Facility word set
File-Access word set
Floating-Point word set
Locals word set
Memory-Allocation word set
Programming-Tools word set
Search-Order word set
String word set
Extended-Character word set
Rationale
Bibliography
Compatibility analysis
Portability guide
Reference Implementations
Test Suite
Alphabetic list of words
Glossary
Introduction
Additional terms and notation
Additional usage requirements
Additional documentation requirements
Compliance and labeling
Glossary
-TRAILING
-TRAILING
/STRING
BLANK
CMOVE
CMOVE>
COMPARE
SEARCH
SLITERAL
REPLACES
SUBSTITUTE
UNESCAPE