Function Entry: ACADSTRLSORT
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: ACADSTRLSORT
Name
`acadstrlsort`
Class
AutoLISP Function
Syntax
(acad_strlsort lst)
Description
Sorts a list of strings in alphabetical order.
Return Values
Vendor-defined; see the per-category page cited under Source Notes.
Side Effects
Vendor-defined.
Examples
Not documented in the current category page.
Availability
- AutoCAD: documented on Windows, Mac OS and Web; measured on AutoCAD 2022.
- BricsCAD: documented in V22; measured on BricsCAD V25 Windows.
- Status: common to AutoCAD and BricsCAD.
clautolisp
clautolisp implements `acadstrlsort` as a pure, host-independent builtin. This note records the concrete headless behaviour; it is not normative for the vendor function.
- Returns a new list holding the input strings in ascending order; the input list is left unmodified and duplicate strings are kept.
- Ordering is case-sensitive and ordinal on character codes: among ASCII, digits < upper-case < lower-case, and code points above 127 (accented / non-ASCII letters) sort after the whole ASCII range. This mirrors the Express Tools byte-ordinal sort over the active ANSI code page (CP-1252 places the Latin-1 accented letters at 0xC0–0xFF, i.e. after A–Z / a–z).
- Case 0 (common behaviour):
MAXSORThas no effect on this function. AutoCAD 2022 and BricsCAD V25 Windows sort 204 strings with MAXSORT set to 0, 1, 2, 200 or 1000 (native probes, 2026-10-16). The factory value remains dialect-specific: 1000 for AutoCAD/clautolisp/lax, 200 for BricsCAD. There is no portability warning for this shared operator. - Invalid input returns nil rather than raising: a non-list argument, an improper (dotted) list, nil / the empty list, or any non-string element all yield nil.
- Exact non-ASCII collation and memory-exhaustion parity remain unprobed;
see
issues/open/deferred-spec-research.issue. The MAXSORT independence is verified byprobes/sources/probe-acad-strlsort-maxsort.lsp.
Source Notes
- [AutoCAD acadstrlsort](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-760DDC5B-9D89-4464-B695-9FCC963B5C12.htm)
- [BricsCAD acadstrlsort](https://developer.bricsys.com/bricscad/help/en_US/V22/DevRef/source/acad_strlsort.htm)
- Status: documented (Phase 3 body fill from the Express Tools category page).