vria / nodiacritic
Tiny helper function that removes all diacritical signs from characters
0.1.2
2016-09-17 22:03 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: 4.8.*
This package is not auto-updated.
Last update: 2024-12-13 23:10:14 UTC
README
Tiny helper function that removes all diacritical signs from characters. Function is aware of German and Danish diacritic particularities.
Installation
composer.json
"require": { "vria/nodiacritic": "0.*" }
Use
use VRia\Utils\NoDiacritic; $noDiacriticString = NoDiacritic::filter("Révolution française");
As expected, the result is Revolution francaise
.
The library is aware of particularities in German and Danish language:
use VRia\Utils\NoDiacritic; $noAccentsNiceStreet = NoDiacritic::filter("Schöne straße", "de");
The result is Schoene strasse
.
The code is inspired by WordPress' remove_accents
function.