ToListInAStringInShortForm()
Short form: a contiguous run of integers (a, a+1, ..., b -- or the descending a, a-1, ..., b) collapses to the range literal "a:b". Anything else falls back to the full stringified list.
also written: ToListInShortForm · ToListInStringInShortForm
Basic examples (2)
? StzListQ( 4:8 ).ToListInString() ? StzListQ( 4:8 ).ToListInStringInShortForm()
[ 4, 5, 6, 7, 8 ] 4:8
run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 378_tolistinstring.ring(opens in a new tab)
? @@( StzListQ( 4:8 ).ToListInAString() ) ? @@( StzListQ( 4:8 ).ToListInAStringInShortForm() )
"[ 4, 5, 6, 7, 8 ]" "4:8"
run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from from_tolistinastring.ring(opens in a new tab)
The extensions of this method
Each extension, and whether it exists for this method; an extension that exists combines with the others (FindSTCS).
Every example is a test file of the library, run inside the library for this page; only those whose output kept every promise their file wrote are shown.
See also
- The class stzList
- The area's reference: Collections & objects
- The other methods in these examples: stzList.Stringified · stzList.ToListInAString

