Jump to content

IBAN: Difference between revisions

→‎{{header|Common Lisp}}: better check for IBAN-characters
(→‎{{header|Common Lisp}}: better check for IBAN-characters)
Line 1,082:
;;
(defun IBAN-characters (iban)
(flet ((valid-alphanum (ch) (or (and (char<= #\A ch) (char>= #\Z ch)) (and (char<= #\0 ch) (char>= #\9 ch)))))
(loopor :for(and (char<= :across#\A ibanch)
:finally (returnchar>= #\Z tch))
:do (and (char<= #\0 ch)
(when (not (valid-alphanum (char>= #\9 ch)))))
(loop for char across iban
(return nil)))))
always (valid-alphanum char))))
 
;;
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.