krakjoe / ustring

UnicodeString for PHP7
Other
64 stars 7 forks source link

add a normalize() method for unicode normalization forms #22

Open Wes0617 opened 8 years ago

Wes0617 commented 8 years ago

stuff already exists in the class Normalizer but would be handy to have it in this class as well. could look like JS's normalize() https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize

echo u($str)->normalize(UString::NFKC)->subString(0, 4);

hikari-no-yume commented 8 years ago

Easy access to normalisation is quite essential. A lot of people neglect it. So, I support this in some form.