brundonsmith / rust_lisp

A Rust-embeddable Lisp, with support for interop with native Rust functions
234 stars 20 forks source link

Character types? #30

Closed kaspar030 closed 1 year ago

kaspar030 commented 1 year ago

I'm thinking of using a Lisp as extension language for a build system, mostly to do text mangling.

For that, I'd need to be able to turn strings into lists of characters, ....

Any plans for implementing this?

brundonsmith commented 1 year ago

It should be fairly easy to implement within your own project as an environment extension. See this section of the README: https://github.com/brundonsmith/rust_lisp#the-environment-and-exposing-rust-functions

(note that there isn't a dedicated char type, so you'd be creating lists of length-one strings instead, as is common for this kind of functionality in many higher-level languages)