Compare length of two strings: Difference between revisions

m
no edit summary
(added Emacs Lisp code to order strings by length)
mNo edit summary
Line 1,269:
<syntaxhighlight lang="lisp">
(defun sort-list-by-string-length (list-of-strings)
"TakeOrder list of strings and orderLIST-OF-STRINGS from longest to shortest."
(sort list-of-strings 'longer-string)) ; usessort by "longer-string" function below for sort order
 
(defun longer-string (string-1 string-2)
27

edits