stringDims: String Dimentions

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/print.char.list.s

Description

Finds the height and width of all the string in a character vector.

Usage

1
stringDims(string)

Arguments

string

vector of strings

Details

stringDims finds the number of characters in width and number of lines in height for each string in the string argument.

Value

height

a vector of the number of lines in each string.

width

a vector with the number of character columns in the longest line.

Author(s)

Charles Dupont

See Also

string.bounding.box, nchar

Examples

1
2
a <- c("this is a single line string", "This is a\nmulty line string")
stringDims(a)

Hmisc documentation built on Oct. 7, 2021, 9:16 a.m.