Subject: Re: Change a string in to a identical list

From: Jean Abou Samra <[email-masked]>
Date: Thu, 4 Jun 2020 20:59:56 +0200

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!").

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

---

From: Jean Abou Samra <[email-masked]>
Date: Thu, 4 Jun 2020 13:17:39 -0700 (MST)

Pardonnez-moi, ce message était pour la liste internationale. Les menus
déroulants automatiques sont parfois trop intelligents pour nous...

Cordialement,
Jean Abou Samra

--
Sent from: http://lilypond-french-users.1298960.n2.nabble.com/