cnpj/generator
Values
pub fn generate(formatted: Bool) -> String
Generates a CNPJ (Cadastro Nacional da Pessoa Jurídica) number.
This function generates a valid CNPJ number, optionally formatted with punctuation.
Parameters
formatted(Bool): IfTrue, the generated CNPJ will be formatted with punctuation (e.g., “12.345.678/0001-95”). IfFalse, the CNPJ will be returned as a plain string of digits.
Returns
- (String): A valid CNPJ number, optionally formatted.