File: string.bounding.box.Rd

package info (click to toggle)
hmisc 4.2-0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 3,332 kB
  • sloc: asm: 27,116; fortran: 606; ansic: 411; xml: 160; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
\name{string.bounding.box}
\alias{string.bounding.box}
\title{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{
  \item{string}{vector of strings}
  \item{type}{character: whether to count characters or screen columns}
}
\value{
  \item{rows}{vector containing the number of character rows in each string}
  \item{columns}{vector containing the maximum number of character
    columns in each string}
}
\author{Charles Dupont}
\seealso{\code{\link{nchar}}, \code{\link{stringDims}}}
\examples{
a <- c("this is a single line string", "This is a\nmulti-line string")
stringDims(a)
}
\keyword{print}