Inverse function of string

Started by HJH, June 01, 2005, 08:23:52 AM

Previous topic - Next topic

HJH

Hi



what is the inverse function of string.


(string 'hello)

gives back


"hello".



If I have a string how do I get  a corresponding atom assuming the atom has no spaces.



A note (or link) in the documentation under the entry string would be helpful.



A similar question: how do I test strings for equality?





Thank you for the answer in advance.



HJH

Sammo

#1
Hello HJH,



(symbol "hello") --> hello

(sym "hello") --> hello

(symbol "Hello") --> Hello

(sym "Hello") --> Hello



The symbols 'hello' and 'Hello' are distinct. The names 'sym' and 'symbol' are two ways of specifying the same function.



(= "hello" "hello") --> true

(= "hello" "Hello") --> nil



-- Sam