Truncate a string with ellipsis, if necessary
Usage
truncateString(x, n = 200L)
Arguments
- x
character(1).
Character string.
- n
integer(1).
Maximum number of characters.
Function will truncate with "...", when applicable.
Examples
truncateString("abcdefgi", n = 6L)
#> [1] "abc..."