Hello,

https://www.gnu.org/software/guile/manual/html_node/List_002fString-Conversion.html

Carl
Carl:
I know about that section but i do not know how to make any thing
there work for this
Do you have an example?
Thank you,ƒg

This is:

(string->list "abcd")

returning (#\a #\b #\c #\d).

This procedure converts a string into a list of
characters.

You may want a list of single-character strings instead.
Then here you go:

(map string (string->list "abcd"))

Thas gives ("a" "b" "c" "d").

The other one on the same page is for splitting a string
following certain criteria. For example, if you want to split
by spaces, then that would be

(string-split "Hello world!" #\space)

resulting in ("Hello" "world!").

And, if you want symbols,

(map string->symbol(map string (string->list "-3 31 A -6 B -8")))

That said, I don't really understand why you are mixing
numbers and letters in your strings. As David suggested,
it would be more natural to start with a list. And if
you provide context about what you're trying to achieve,
we likely can give more helpful answers.

Best,

Jean Abou Samra

Reply via email to