Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

mlr3misc (version 0.17.0)

str_trunc: Truncate Strings

Description

str_trunc() truncates a string to a given width.

Usage

str_trunc(str, width = 0.9 * getOption("width"), ellipsis = "[...]")

Value

(character()).

Arguments

str

(character())
Vector of strings.

width

(integer(1))
Width of the output.

ellipsis

(character(1))
If the string has to be shortened, this is signaled by appending ellipsis to str. Default is "[...]".

Examples

Run this code
str_trunc("This is a quite long string", 20)

Run the code above in your browser using DataLab