1. Check existence of mb_string, mysql and xml extensions before installation.
[openemr.git] / phpmyadmin / libraries / StringByte.int.php
blob7da1fd88f2f1757a228e29a5292960591f86ee08
1 <?php
2 /**
3 * Defines a set of specialized string functions.
5 * @package PhpMyAdmin-String
6 */
8 /**
9 * Defines a set of specialized string functions.
11 * @package PhpMyAdmin-String
13 interface PMA_StringByte
15 /**
16 * Returns length of string depending on current charset.
18 * @param string $string string to count
20 * @return int|false string length
22 public function strlen($string);
24 /**
25 * Returns substring from string, works depending on current charset.
27 * @param string $string string to count
28 * @param int $start start of substring
29 * @param int $length length of substring
31 * @return string|false the sub string
33 public function substr($string, $start, $length = 2147483647);
35 /**
36 * Returns number of substring from string, works depending on current charset.
38 * @param string $string string to check
39 * @param int $needle string to count
41 * @return int number of substring from the string
43 public function substrCount($string, $needle);
45 /**
46 * Returns position of $needle in $haystack or false if not found
48 * @param string $haystack the string being checked
49 * @param string $needle the string to find in haystack
50 * @param int $offset the search offset
52 * @return int|false position of $needle in $haystack or false
54 public function strpos($haystack, $needle, $offset = 0);
56 /**
57 * Returns position of $needle in $haystack - case insensitive - or false if
58 * not found
60 * @param string $haystack the string being checked
61 * @param string $needle the string to find in haystack
62 * @param int $offset the search offset
64 * @return int|false position of $needle in $haystack or false
66 public function stripos($haystack, $needle, $offset = 0);
68 /**
69 * Returns position of last $needle in $haystack or false if not found
71 * @param string $haystack the string being checked
72 * @param string $needle the string to find in haystack
73 * @param int $offset the search offset
75 * @return int|false position of last $needle in $haystack or false
77 public function strrpos($haystack, $needle, $offset = 0);
79 /**
80 * Returns position of last $needle in $haystack - case insensitive - or false
81 * if not found
83 * @param string $haystack the string being checked
84 * @param string $needle the string to find in haystack
85 * @param int $offset the search offset
87 * @return int|false position of last $needle in $haystack or false
89 public function strripos($haystack, $needle, $offset = 0);
91 /**
92 * Returns part of $haystack string starting from and including the first
93 * occurrence of $needle to the end of $haystack or false if not found
95 * @param string $haystack the string being checked
96 * @param string $needle the string to find in haystack
97 * @param bool $before_needle the part before the needle
99 * @return string|false part of $haystack or false
101 public function strstr($haystack, $needle, $before_needle = false);
104 * Returns part of $haystack string starting from and including the first
105 * occurrence of $needle to the end of $haystack - case insensitive - or false
106 * if not found
108 * @param string $haystack the string being checked
109 * @param string $needle the string to find in haystack
110 * @param bool $before_needle the part before the needle
112 * @return string|false part of $haystack or false
114 * @deprecated
115 * @see DON'T USE UNTIL HHVM IMPLEMENTS THIRD PARAMETER!
117 public function stristr($haystack, $needle, $before_needle = false);
120 * Returns the portion of haystack which starts at the last occurrence or false
121 * if not found
123 * @param string $haystack the string being checked
124 * @param string $needle the string to find in haystack
126 * @return string|false portion of haystack which starts at the last occurrence
127 * or false
129 public function strrchr($haystack, $needle);
132 * Make a string lowercase
134 * @param string $string the string being lowercased
136 * @return string the lower case string
138 public function strtolower($string);
141 * Make a string uppercase
143 * @param string $string the string being uppercased
145 * @return string the lower case string
147 public function strtoupper($string);
150 * Returns position of $needle in $haystack from a regular expression match
152 * @param string $pattern Pattern to search for
153 * @param string $subject Input string
154 * @param int $offset Start from search
156 * @return int|false position of $needle in $haystack or false
158 public function pregStrpos($pattern, $subject, $offset = 0);
161 * Get the ordinal value of a string
163 * @param string $string the string for which ord is required
165 * @return string the ord value
167 public function ord($string);
170 * Get the character of an ASCII
172 * @param int $ascii the ASCII code for which character is required
174 * @return string the character
176 public function chr($ascii);