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

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 April 9, 2024, 11:45 p.m.