Hmisc (version 4.0-0)

string.bounding.box: Determine Dimensions of Strings

Description

This determines the number of rows and maximum number of columns of each string in a vector.

Usage

string.bounding.box(string, type = c("chars", "width"))

Arguments

string
vector of strings
type
character: whether to count characters or screen columns

Value

See Also

nchar, stringDims

Examples

Run this code
a <- c("this is a single line string", "This is a\nmulti-line string")
stringDims(a)

Run the code above in your browser using DataCamp Workspace