xdrx-string-logical<Used to compare two strings in logical order. This function is typically used to sort a list of files to ensure that the files are arranged in a logical order that humans understand, rather than a simple dictionary order.
example:
Command: (acad_strlsort (list "file200.txt" "file100.txt" "file10.txt" "file5.txt"))
("file10.txt" "file100.txt" "file200.txt" "file5.txt")
Command: (vl-sort (list "file200.txt" "file100.txt" "file10.txt" "file5.txt") '(lambda(x y)(xdrx-string-logical< x y)))
("file5.txt" "file10.txt" "file100.txt" "file200.txt")
(defun xd::string:sortlist
(strl
) )
;assoc string list sort
(defun xd::string:assocsortlist
(strl
) )
xd::string:assocsortlist
_$
(("file100.txt" (1 2 3)) ("file0.txt" (1 2 3)) ("file20.txt" (1 2 3)) ("file300.txt" (1 2 3)))
(("file0.txt" (1 2 3)) ("file20.txt" (1 2 3)) ("file100.txt" (1 2 3)) ("file300.txt" (1 2 3)))
_$