string.lib.php 800 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /** String Functions for phpMyAdmin
  4. *
  5. * If mb_* functions don't exist, we create the ones we need and they'll use the
  6. * standard string functions.
  7. *
  8. * All mb_* functions created by pMA should behave as mb_* functions.
  9. *
  10. * @package PhpMyAdmin
  11. */
  12. if (! defined('PHPMYADMIN')) {
  13. exit;
  14. }
  15. if (!defined('MULTIBYTES_ON')) {
  16. define('MULTIBYTES_ON', true);
  17. define('MULTIBYTES_OFF', false);
  18. }
  19. if (@function_exists('mb_strlen')) {
  20. if (!defined('MULTIBYTES_STATUS')) {
  21. define('MULTIBYTES_STATUS', MULTIBYTES_ON);
  22. }
  23. include_once 'libraries/stringMb.lib.php';
  24. } else {
  25. if (!defined('MULTIBYTES_STATUS')) {
  26. define('MULTIBYTES_STATUS', MULTIBYTES_OFF);
  27. }
  28. include_once 'libraries/stringNative.lib.php';
  29. }