Ok, so this does essentially the same,
but it does it in place and doesn't use any
extra words:
(select test 'type) =
to-path foreach str parse text "_" [append [] to-word str]
except for 'str, which is tucked away safely in
the foreach's context.
Anton.
> << I'm sure this is again one of those things where I'm just not smart
> enough... I would expect 'true instead of 'false with this code:
>
> >> test: [type contact/company]
> == [type contact/company]
> >> text: "contact_company"
> == "contact_company"
> >> (select test 'type) = (to-path replace text "_" "/")
> == false >>
>
> When you do to-path on the string, it doesn't parse the string
> and create a
> path based on the slash delimiter. The path it creates only contains one
> element, even though it looks like it contains two because of the embedded
> slash.
>
> I'm sure somebody has a better way to do this, but since I don't know what
> it is, I hacked this real quick to convert a delimited string to a path.
>
> path-from-dlm-string: func [string dlm /local result] [
> result: make path! none
> foreach item parse/all string dlm [
> append result to word! item
> ]
> result
> ]
>
> HTH!
>
> --Gregg
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.