Message 1 of 9
Alphanumeric sort
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am looking to sort the following list ("U20" "U10" "U110" "U11" "T1" "V1") to first be sorted alphabetically then numerically so that it ends up being ("T1" "U10" "U11" "U20" "U110" "V1") this is the funtion I am currently using
(defun sort (l)
(defun sortFunc (m n)
(< (car m) (car n))
)
(vl-sort l 'sortFunc)
)
This works fine till you get to a 3 digit number then it tries to do ("T1" "U10" "U11" "U110" "U20" "V1").
Any suggestions?