1% Generated by roxygen2 (4.1.1): do not edit by hand 2% Please edit documentation in R/pystr_zfill.R 3\name{pystr_zfill} 4\alias{pystr_zfill} 5\title{Zero-pad a string.} 6\usage{ 7pystr_zfill(str, width) 8} 9\arguments{ 10\item{str}{A character vector.} 11 12\item{width}{An integer.} 13} 14\value{ 15A character vector. 16} 17\description{ 18Return a copy of the string left filled with ASCII \code{'0'} digits to make 19a string of length \code{width}. 20} 21\details{ 22A leading sign prefix (+/-) is handled by inserting the padding after 23the sign character rather than before. The original string is returned if 24\code{width} is less than or equal to \code{nchar(str)}. 25} 26\examples{ 27pystr_zfill("42", 5) 28pystr_zfill("-42", 5) 29pystr_zfill("+42", 5) 30} 31\references{ 32\url{https://docs.python.org/3/library/stdtypes.html#str.zfill} 33} 34 35