Update: ElStr.class.php goes to v1.2


php-iconThe 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 letters
    • str_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: Το μπαρμπουνακι θελει μπυριτσα

Downloads

Download v1.2      View Source