Shorten Strings to a Maximum Length
Usage
shorten(x, max_chars = 10, delimiter = "...")
Arguments
- x
vector of character
- max_chars
maximum number of characters to which the strings in
x
are to be shortened
- delimiter
string to be used as separater between the start and the end
of the strings in x
that are longer than max_chars
characters
Value
x
with strings longer than max_chars
characters being
shortend by replacing characters in the centre by the delimiter
string.