powered by
str_trunc(string, width, side = c("right", "left", "center"), ellipsis = "...")
str_pad
x <- "This string is moderately long" rbind( str_trunc(x, 20, "right"), str_trunc(x, 20, "left"), str_trunc(x, 20, "center") )
Run the code above in your browser using DataLab