lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Downcase of a symbol


From: Urs Liska
Subject: Re: Downcase of a symbol
Date: Sat, 13 Aug 2016 13:57:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0


Am 13.08.2016 um 08:10 schrieb David Kastrup:
> Urs Liska <address@hidden> writes:
>
>> I have written a function to return the lowercase version of a symbol
>> for use in my library as
>>
>> % Return the lowercase version of a symbol
>> #(define (symbol->lowercase sym)
>>    (string->symbol
>>     (string-downcase
>>      (symbol->string sym))))
>>
>> Just a small question: this seems so general
> Why?  What would that be useful for?  Normal convention for symbols is
> already lowercase.

I accept package/module names as a symbol-list path, and users are
allowed to write them using "display" names, like

\loadModule scholarLY.annotate

Internally I'm converting them to lowercase to prevent ambiguity, so
input is a symbol but with arbitrary case. Having a list of strings
would be much less convenient to use.

>
>> that I can't imagine it isn't already available somewhere in Scheme,
>> Guile or LilyPond. Of course I'd prefer using an official function
>> instead of my own.
>>
>> Thanks for any pointers
> Well, grepping for downcase in LilyPond does not return anything that
> would look like a facility of that kind.
>

OK, so I keep it "private".

Best
Urs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]