Advertisement
Guest User

mb_strcmp

a guest
Jul 5th, 2011
3,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * Comparaison de chaines unicode
  5.  */
  6. if (!function_exists('mb_strcmp')) {
  7.  
  8.   function mb_strcmp($s1, $s2) {
  9.  
  10.     return strcmp(
  11.       iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $s1),
  12.       iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $s2));
  13.   }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement