Extend a sorted vector with a sorted sequence of items, maintaining the vector’s sort order and
enforcing a maximum length. This also de-duplicates items. Sort the items according to the given callback. Before calling this,
both vec and new_items should already be sorted according to the cmp comparator.
Similar to str::split, but also provides byte-offset ranges of the results. Unlike
str::split, this is not generic on pattern types and does not return an Iterator.
Removes characters from the front of the string if its length is greater than max_chars and
prepends the string with “…”. Returns string unchanged if its length is smaller than max_chars.
Removes characters from the end of the string if its length is greater than max_chars and
appends “…” to the string. Returns string unchanged if its length is smaller than max_chars.
Takes only max_lines from the string and, if there were more than max_lines-1, appends a
a newline and “…” to the string, so that max_lines are returned.
Returns string unchanged if its length is smaller than max_lines.
Yields [i, i + 1, i - 1, i + 2, ..], each modulo wrap_length and bounded by
additional_before and additional_after. If the wrapping causes overlap, duplicates are not
emitted. If wrap_length is 0, nothing is yielded.