Strip control codes and extended characters from a string: Difference between revisions

Content added Content deleted
Line 583: Line 583:
(let* ((127-operator (if strip-extended #'>= #'=)))
(let* ((127-operator (if strip-extended #'>= #'=)))
(remove-if (lambda (ch)
(remove-if (lambda (ch)
(or (< char-code ch 32)
(or (< (char-code ch) 32)
(funcall 127-operator (char-code ch) 127)))
(funcall 127-operator (char-code ch) 127)))
string)))
string)))