I am using a Prolog query in a Common Lisp program to get the date of birth from a knowledge base. The query returns the value formatted as {1991-05-13}
, and I assign to this value on dob
variable with setq
: (setq dob {1991-05-13})
. I want to use this date value in a new function which takes string, so I am trying to use write-to-string
to convert dob
to a string with (setq strdob (write-to-string dob))
, but it returns
"{1991-05-13}"
I actually want:
"1991-05-13"
which lacks the curly braces. How could I trim the curly braces from the string?
(string-trim "{}" "{1991-05-13}")
(the character-bag can be any sequence and it may be more natural to express it as a string). – Justify