bfunky / ascii
A library to validate strings and transliterate to ascii encoding
Installs: 42 646
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 1
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: 6.*
README
A library to validate strings and transliterate to ascii encoding
Usage as static class
Validate if given value is a valid ascii string
//returns true $result = Ascii::isValid('this string is valid'); //returns false $result = Ascii::isValid('cette chaîne est valide');
Transliterate a string
//print `cette chaine est valide` echo Ascii::transliterate('cette chaîne est valide');
Usage creating an instance
Validate if given value is a valid ascii string
$ascii = new Ascii(); //returns true $result = $ascii->isValid('this string is valid'); //returns false $result = $ascii->isValid('cette chaîne est valide');
Transliterate a string
$ascii = new Ascii(); //print `cette chaine est valide` echo $ascii->transliterate('cette chaîne est valide');