Common Lisp Programmatic Keyword

后端 未结 6 1108
我在风中等你
我在风中等你 2020-12-14 07:10

Is there a function in Common Lisp that takes a string as an argument and returns a keyword?

Example: (keyword \"foo\") -> :foo

6条回答
  •  情书的邮戳
    2020-12-14 07:56

    There is a make-keyword function in the Alexandria library, although it does preserve case so to get exactly what you want you'll have to upcase the string first.

提交回复
热议问题