The PHP Class ElStr with usefull functions for modern greek unicode text manipulation, such as transcript greek to latin, or accent marks stripping is now updated to version 1.2
What’s new?
- mixed case support for difthongs, etc:
μπ => mp
orτζ => tz
Μπ => Mp
orΤζ => Tz
μΠ => mP
orτΖ => tZ
ΜΠ => MP
orΤΖ => TZ
- Two new accent mark removal methods:
strtolower_no_accent($str)
– that Convert unicode string to lower case, without accent marks for the greek lettersstr_no_accent($str)
– that Remove accent marks for the greek letters at passed unicode string (no any case convertion)
Examples
require('ElStr.class.php') ;
$txt = "Το μπαρμπουνάκι θέλει μπυρίτσα" ;
$elstrObj = new El_Str() ;
echo $elstrObj->to_latin($txt) ;
//echoes: To barmpounaki thelei byritsa
echo $elstrObj->strtoupper_no_accent($txt) ;
//echoes: ΤΟ ΜΠΑΡΜΠΟΥΝΑΚΙ ΘΕΛΕΙ ΜΠΥΡΙΤΣΑ
echo $elstrObj->strtolower_no_accent($txt) ;
//echoes: το μπαρμπουνακι θελει μπυριτσα
echo $elstrObj->str_no_accent($txt) ;
//echoes: Το μπαρμπουνακι θελει μπυριτσα