[REBOL] Re: Comparing path!
From: greggirwin:mindspring at: 30-Aug-2002 10:47
<< 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"
>> (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
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