lilypond-user
[Top][All Lists]
Advanced

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

Re: Predicate for a string representing an integer


From: caagr98
Subject: Re: Predicate for a string representing an integer
Date: Tue, 30 May 2017 11:22:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 05/30/17 11:13, Jan-Peter Voigt wrote:
I doubt that checking all characters in the string are in the range '0'-'9' is faster then string->number.

Don't forget the optional leading hyphen, base specifiers (#x, #o, #d, #b), etc.

However, do keep in mind that (integer? (string->number x)) accepts "2/2", "1.0", "1e10", and even "1.0000000000000001" as integers, which might not be what you want.



reply via email to

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