tr_trunc_neatly: Cleanly trim long strings

View source: R/tr_trunc_neatly.R

tr_trunc_neatlyR Documentation

Cleanly trim long strings

Description

Trims the input string to the desired length, appending an ellipsis to the end, without splitting in the middle of a word.

Usage

tr_trunc_neatly(x, l = 60)

Arguments

x

Input string to trim to desired length, appending an ellipsis to the end, and without splitting words

l

Desired length at which to trim strings (defaults to 60)

Value

Character string

References

None.

See Also

https://www.github.com/travis-m-blimkie/tRavis

Examples

tr_trunc_neatly("This is a test string", l = 17)


travis-m-blimkie/tRavis documentation built on July 25, 2024, 9:07 p.m.