Sujet : Re: Reverse SCAN SPLIT
De : mhx (at) *nospam* iae.nl (mhx)
Groupes : comp.lang.forthDate : 17. Oct 2024, 11:29:32
Autres entêtes
Organisation : novaBBS
Message-ID : <73ec4c8359439c78d77d4fce31fc50b2@www.novabbs.com>
References : 1 2 3 4 5
User-Agent : Rocksolid Light
On Thu, 17 Oct 2024 8:28:26 +0000,
albert@spenarnc.xs4all.nl wrote:
In article <nnd$231969a2$24a04042@87f25e33f755b9dd>,
[..]
Compare to what I'm doing. Promoting the actual API specification
so that you can decide whether you want to actually use it.
>
$/
>
>
STACKEFFECT: sc c --- sc1 sc2
>
DESCRIPTION: []
>
Find the first c in the string constant sc and split it at that
address. Return the strings after and before c into sc1 and sc2
respectively. If the character is not present sc1 is a null string
(its address is zero) and sc2 is the original string. Both sc1 and
sc2 may be empty strings (i.e. their count is zero), if c is the
last or first character in sc .
Wil Baden chose to keep c in sc2. Do you have a reason to
remove it?
It seems logical to remove it. I normally use lots of
`1 /STRING' and `-LEADING' or `-TRAILING' sequences in further
processing of Split-At-Char results, but not always.
Maybe because an empty sc2 is less informative than an sc2 of
size 1?
-marcel