Logo

Programming-Idioms

History of Idiom 137 > diff from v29 to v30

Edit summary for version 30 by foobar:
New Lisp implementation by user [foobar]

Version 29

2019-09-26, 13:54:16

Version 30

2019-09-26, 16:13:08

Idiom #137 Check if string contains only digits

Set boolean b to true if string s contains only characters in range '0'..'9', false otherwise.

Idiom #137 Check if string contains only digits

Set boolean b to true if string s contains only characters in range '0'..'9', false otherwise.

Code
(setf b (every #'digit-char-p s))