R/zero_paste2.R

Defines functions zero_paste2

zero_paste2 <-
function(x, len) {
  x <- as.character(x)
  xn <- nchar(x)
  zeros <- paste0(rep("0", (len - xn)), collapse = "")
  x <- paste(zeros, x, sep = "")
  return(x)
}

Try the chinese.misc package in your browser

Any scripts or data that you put into this service are public.

chinese.misc documentation built on Sept. 13, 2020, 5:13 p.m.