StringByte.int.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Defines a set of specialized string functions.
  4. *
  5. * @package PhpMyAdmin-String
  6. * @todo May be move this into file of its own
  7. */
  8. interface PMA_StringByte
  9. {
  10. /**
  11. * Returns length of string depending on current charset.
  12. *
  13. * @param string $string string to count
  14. *
  15. * @return int string length
  16. */
  17. public function strlen($string);
  18. /**
  19. * Returns substring from string, works depending on current charset.
  20. *
  21. * @param string $string string to count
  22. * @param int $start start of substring
  23. * @param int $length length of substring
  24. *
  25. * @return string the sub string
  26. */
  27. public function substr($string, $start, $length = 2147483647);
  28. /**
  29. * Returns postion of $needle in $haystack or false if not found
  30. *
  31. * @param string $haystack the string being checked
  32. * @param string $needle the string to find in haystack
  33. * @param int $offset the search offset
  34. *
  35. * @return integer position of $needle in $haystack or false
  36. */
  37. public function strpos($haystack, $needle, $offset = 0);
  38. /**
  39. * Make a string lowercase
  40. *
  41. * @param string $string the string being lowercased
  42. *
  43. * @return string the lower case string
  44. */
  45. public function strtolower($string);
  46. /**
  47. * Get the ordinal value of a string
  48. *
  49. * @param string $string the string for which ord is required
  50. *
  51. * @return string the ord value
  52. */
  53. public function ord($string);
  54. }
  55. ?>