% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tostring.R
\name{padstr}
\alias{padstr}
\title{Pad a string and align within string}
\usage{
padstr(x, n, just = c("center", "left", "right"))
}
\arguments{
\item{x}{string}

\item{n}{number  of  character  of the  output  string,  if \code{n  < nchar(x)} an error is thrown}

\item{just}{character(1).   Text  alignment   justification  to
use. Defaults to center. Must be center, right or left.}
}
\value{
\code{x}, padded to be a string of \code{n} characters
}
\description{
Pad a string and align within string
}
\examples{

padstr("abc", 3)
padstr("abc", 4)
padstr("abc", 5)
padstr("abc", 5, "left")
padstr("abc", 5, "right")

if (interactive()) {
  padstr("abc", 1)
}
}
