crates.io Open in urlscan Pro
2600:9000:26fa:9600:c:7ed3:240:93a1  Public Scan

URL: https://crates.io/crates/cpf_cnpj
Submission: On September 12 via api from US — Scanned from US

Form analysis 1 forms found in the DOM

/search

<form class="_form_17hnvp" action="/search" role="search" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false">
  <input class="_input-lg_17hnvp _input_17hnvp" inputmode="search" name="q" id="cargo-desktop-search" placeholder="Type 'S' or '/' to search" autofocus="autofocus" required="" aria-label="Search" type="text">
  <input class="_input-sm_17hnvp _input_17hnvp" inputmode="search" name="q" placeholder="Search" required="" aria-label="Search" type="text">
  <button class="_submit-button_17hnvp _button-reset_g91299" type="submit">
    <span class="_submit-label_17hnvp _sr-only_1igkyf">Submit</span>
    <svg height="512" width="512" viewBox="0 0 512 512" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="_submit-icon_17hnvp">
      <path
        d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z">
      </path>
    </svg>
  </button>
</form>

Text Content

For full functionality of this site it is necessary to enable JavaScript.




CRATES.IO


THE RUST COMMUNITY’S CRATE REGISTRY

Submit
Change color scheme
 * light
 * dark
 * system

Browse All Crates | Log in with GitHub
Change color scheme
 * light
 * dark
 * system

Menu
 * Browse All Crates
 * Log in with GitHub


CPF_CNPJ V0.2.1

Validador de CPF e CNPJ para Rust.
 * #cpf
 * #cnpj
 * #validador
 * #validate

 * Readme
 * 4 Versions
 * Dependencies
 * Dependents
   


CPF_CNPJ

Validador e Gerador de CPF e CNPJ para Rust.

• • •

Alguns características importantes devem ser destacadas nessa biblioteca:

 * Analisa repetições de dígitos como 111.111.111-11 ou 000.000.000-00.
 * Ignora caracteres especiais.
 * Valida antecipadamente a quantidade de dígitos numéricos


INSTALAÇÃO

Adicione essa dependência no seu Cargo.toml:

[dependencies]
cpf_cnpj = "0.1.0"



USO BÁSICO

Abaixo uma forma simples de como utilizar essa biblioteca:

extern crate cpf_cnpj;

use cpf_cnpj::cpf;
use cpf_cnpj::cnpj;

cpf::validate("255.248.930-33");
// true

cpf::validate("25524893033");
// true

cpf::validate("99999999999");
// false

cnpj::validate("36.002.518/0001-01");
// true

cnpj::validate("36002518000101");
// true

cpf::generate();
// 25524893033

cnpj::generate();
// 76071265000142



LICENÇA

cpf_cnpj é um software Open Source licenciado pelo MIT.


METADATA

about 4 years ago

MIT
3.11 KiB


INSTALL

Run the following Cargo command in your project directory:

cargo add cpf_cnpj

Or add the following line to your Cargo.toml:

cpf_cnpj = "0.2.1"


DOCUMENTATION

docs.rs/cpf_cnpj/0.2.1


REPOSITORY

github.com/andrelmlins/cpf_cnpj


OWNERS

 * André Lins

Report crate


STATS OVERVIEW

7,860 Downloads all time
4 Versions published

DOWNLOADS OVER THE LAST 90 DAYS

Display as
Stacked
 * Stacked
 * Unstacked




RUST

 * rust-lang.org
 * Rust Foundation
 * The crates.io team


GET HELP

 * The Cargo Book
 * Email Support
 * System Status
 * Report a bug


POLICIES

 * Usage Policy
 * Security
 * Privacy Policy
 * Code of Conduct
 * Data Access


SOCIAL

 * rust-lang/crates.io
 * @cratesiostatus
 * #t-crates-io