npm-cuenta-caracteres
v1.0.3
Published
Modulo que recibe una frase y un caracter. Cuenta la cantidad de veces que ese caracter aparece en la frase
Downloads
14
Readme
Este paquete te permite contar el numero de veces que un caracter aparece en un texto.
el primer paso seria hacer require de la funcion const cuentaCaracteres = require("npm-cuenta-caracteres");
Utilizamos la funcion cuentaCaracteres("texto", "caracter") y le pasamos el texto y el caracter que queramos buscar en el texto
cuentaCaracteres("Hola mi nombre es ana y tengo hambre", "a") esta funcion devolvera el numero de veces que la letra a aparece en el texto = 4;