Your question has several misconceptions. Usually in Lisp variables don't have a type.
Repeat: Variables in Lisp have no types.
You can ask if some Lisp value is of some type or what type it has. Lisp objects have types attached.
Common Lisp has no type 'string'? Why don't you look into the documentation? It is easy.
Common Lisp HyperSpec: http://www.lispworks.com/documentation/HyperSpec/Front/index.htm
Symbol Index: http://www.lispworks.com/documentation/HyperSpec/Front/X_Symbol.htm
Symbol Index for S: http://www.lispworks.com/documentation/HyperSpec/Front/X_Alph_S.htm
STRING: http://www.lispworks.com/documentation/HyperSpec/Body/a_string.htm#string
System Class STRING: http://www.lispworks.com/documentation/HyperSpec/Body/t_string.htm
So Common Lisp has a type STRING
.
The Strings Dictionary also lists other string types: BASE-STRING
, SIMPLE-STRING
, SIMPLE-BASE-STRING
.
I'm using LispWorks, so the returned types look a bit different:
CL-USER 20 > (type-of "foo")
SIMPLE-BASE-STRING
CL-USER 21 > (typep "foo" 'string)
T
CL-USER 22 > (stringp "foo")
T
CL-USER 23 > (subtypep 'simple-base-string 'string)
T
T
CL-USER 24 > (let ((var "foo")) (typep var 'string))
T
Secret: variables in Common Lisp can be typed, but that is another story.