language-ext v3.3.49 Release Notes
Release Date: 2020-01-12 // about 4 years ago-
Collections
ToString
All of the collection types now have a default
ToString()
implementation that presents like so for small list-like collections:"[1, 2, 3, 4, 5]"
And for maps: (
HashMap
andMap
):"[(A: 1), (B: 2), (C: 3), (D: 4), (E: 5)]"
Larger collections will have
CollectionFormat.MaxShortItems
and then an ellipsis followed by the number of items remaining. Unless the collection is lazy, in which case only the ellipsis will be shown:"[1, 2, 3, 4, 5 ... 50 more]"
0๏ธโฃ
CollectionFormat.MaxShortItems
can be set directly if the default of50
items in aToString()
isn't good suitable for your application.In addition to this there's two extra methods per collection type:
string ToFullString(string separator = ", ")
๐ This will build a string from all of the items in the collection.
string ToFullArrayString(string separator = ", ")
๐ This will build a string from all of the items in the collection and wrap with brackets
[]
.๐ Fixes