diff options
| author | Murilo Ijanc <[email protected]> | 2026-07-26 12:42:37 -0300 |
|---|---|---|
| committer | Murilo Ijanc <[email protected]> | 2026-07-26 12:42:37 -0300 |
| commit | 11d49bc25eb1643f1b742f9527212d8781f2e0de (patch) | |
| tree | bae1cb090cbf6c9f82ab5abbaf1194206f92f539 /man/normalize_cep.Rd | |
| download | r-11d49bc25eb1643f1b742f9527212d8781f2e0de.tar.gz | |
Initial importv0.1.0
Diffstat (limited to 'man/normalize_cep.Rd')
| -rw-r--r-- | man/normalize_cep.Rd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/man/normalize_cep.Rd b/man/normalize_cep.Rd new file mode 100644 index 0000000..6f9b462 --- /dev/null +++ b/man/normalize_cep.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/normalize.R +\name{normalize_cep} +\alias{normalize_cep} +\title{Return the 8 digits of a CEP, accepting the mask} +\usage{ +normalize_cep(value) +} +\arguments{ +\item{value}{A length-one character vector. Numbers are rejected on +purpose: \code{1001000} has already lost the leading zero that makes +\code{"01001000"} a CEP. Convert with \code{sprintf("\%08d", x)} first.} +} +\value{ +The 8 digits, as a length-one character vector. +} +\description{ +\code{"01001-000"}, \code{"01001000"}, \code{"01001.000"} and \code{" 01001-000 "} all become +\code{"01001000"}. + +This runs \strong{before} any request: a 7-digit CEP is the caller's bug, and +spending a round trip for the server to say so wastes both sides' time. +} +\section{Conditions}{ + +Signals \link[=cepis_conditions]{cepis_invalid_cep} unless exactly 8 digits +remain. +} + +\examples{ +normalize_cep("01001-000") + +} |