\HeaderA{strtrim}{Trim Character Strings to Specified Widths}{strtrim}
\keyword{character}{strtrim}
\keyword{utilities}{strtrim}
\begin{Description}\relax
Trim character strings to specified display widths.
\end{Description}
\begin{Usage}
\begin{verbatim}
strtrim(x, width)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a character vector, or an object which can be coerced to a
character vector.
\item[\code{width}] Positive integer values: recycled to the length of \code{x}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\sQuote{Width} is interpreted as the display width in a monospaced
font.  What happens with non-printable characters (such as backspace, tab)
is implementation-dependent and may depend on the locale (e.g. they
may be included in the count or they may be omitted).

Using this function rather than \code{\LinkA{substr}{substr}} is important when
there might be double-width characters in character vectors
\end{Details}
\begin{Value}
A character vector of the same length as \code{x}.
\end{Value}
\begin{Examples}
\begin{ExampleCode}
strtrim(c("abcdef", "abcdef", "abcdef"), c(1,5,10))
\end{ExampleCode}
\end{Examples}

