Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the nsort Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 14:31:27 2020 GMT+0.
• Introduction | What nsort is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
short for numeric or natural sort
1 2 10 instead of 1 10 2
http://stackoverflow.com/questions/27307660/how-to-implement-natural-sort-in-common-lisp
https://groups.google.com/forum/#!searchin/comp.lang.lisp/human$20sort/comp.lang.lisp/8-NU77NMl-I/AMXgN3NMbpQJ
(defparameter words
'("+gray10+" "+gray11+" "+yellow+" "+gray1+" "+gray2+" "+gray+" "+gray0+"))
(sort (copy-list words) #'nsort:nstring<)
; ("+gray+" "+gray0+" "+gray1+" "+gray2+" "+gray10+" "+gray11+" "+yellow+")
(sort (copy-list words) #'nsort:nstring>)
; ("+yellow+" "+gray11+" "+gray10+" "+gray2+" "+gray1+" "+gray0+" "+gray+")
(defparameter words-case
'("+Gray10+" "+gray11+" "+YELLow+" "+gray1+" "+gray2+" "+gray+" "+gray0+"))
(sort (copy-list words-case) #'nsort:nstring-lessp)
; ("+gray+" "+gray0+" "+gray1+" "+gray2+" "+Gray10+" "+gray11+" "+YELLow+")
(sort (copy-list words-case) #'nsort:nstring-greaterp)
; ("+YELLow+" "+gray11+" "+Gray10+" "+gray2+" "+gray1+" "+gray0+" "+gray+")
(prove:run #P"path-to/test.lisp")
(sort '("a20" #\0 "a2" a10 "a1") #'nsort:nstring<) ; (#\0 "a1" "a2" A10 "a20")
except case convertion problems with 'bAr --> "bAr"
(sort '(bc2 |bc1| "bc10" a10 "a1") #'nsort:nstring<) ; ("a1" A10 |bc1| BC2 "bc10")
(sort '(bc2 bc1 "bc10" a10 "a1") #'nsort:nstring<) ; (BC1 BC2 "a1" A10 "bc10")
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The nsort system |
BSD Simplified
Natural or Numeric Sort
prove
nsort.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The nsort.asd file | ||
• The nsort/package.lisp file | ||
• The nsort/nsort.lisp file |
Next: The nsort/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
nsort.asd
nsort (system)
Next: The nsort/nsort․lisp file, Previous: The nsort․asd file, Up: Lisp files [Contents][Index]
Previous: The nsort/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
nsort (system)
nsort.lisp
defnsf (macro)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The nsort package |
package.lisp (file)
common-lisp
defnsf (macro)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions |
Previous: Exported definitions, Up: Exported definitions [Contents][Index]
nsort.lisp (file)
nsort.lisp (file)
nsort.lisp (file)
nsort.lisp (file)
nsort.lisp (file)
nsort.lisp (file)
nsort.lisp (file)
nsort.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal macros |
Previous: Internal definitions, Up: Internal definitions [Contents][Index]
nsort.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L N |
---|
Jump to: | F L N |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | D F M N |
---|
Jump to: | D F M N |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | N P S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
N | |||
nsort : | The nsort system | ||
nsort : | The nsort package | ||
| |||
P | |||
Package, nsort : | The nsort package | ||
| |||
S | |||
System, nsort : | The nsort system | ||
|
Jump to: | N P S |
---|