converting number to string in lisp

前端 未结 3 1885
失恋的感觉
失恋的感觉 2021-02-01 18:08

I tried to find a lisp function to convert between numbers and strings and after a little googling I fond a function with the same name. when I entered (itoa 1) SLI

3条回答
  •  故里飘歌
    2021-02-01 18:37

    A heavyweight solution is to use FORMAT:

    [2]> (format nil "~A" 1)
    "1"
    

    There is also WRITE-TO-STRING:

    [3]> (write-to-string 10)
    "10"
    

提交回复
热议问题