Learn R Programming

goat (version 1.1.2)

string_trunc_right: simple string truncation

Description

replacement for stringr::trunc() so we don't need a package dependency for just 1 function (our code was adapter therefrom)

Usage

string_trunc_right(string, width, trim_left = FALSE)

Value

truncated variant of input string

Arguments

string

string that should be truncated

width

desired max length

trim_left

instead of right trunc (default), do left instead