| @@ 129-140 (lines=12) @@ | ||
| 126 | } |
|
| 127 | } |
|
| 128 | ||
| 129 | if (!function_exists('contains')) { |
|
| 130 | function contains($haystack, $needles) |
|
| 131 | { |
|
| 132 | foreach ((array) $needles as $currentNeedle) { |
|
| 133 | if (strpos($haystack, $currentNeedle) !== false) { |
|
| 134 | return true; |
|
| 135 | } |
|
| 136 | } |
|
| 137 | ||
| 138 | return false; |
|
| 139 | } |
|
| 140 | } |
|
| 141 | ||
| 142 | if (!function_exists('startsWith')) { |
|
| 143 | function startsWith($haystack, $needles) |
|
| @@ 142-154 (lines=13) @@ | ||
| 139 | } |
|
| 140 | } |
|
| 141 | ||
| 142 | if (!function_exists('startsWith')) { |
|
| 143 | function startsWith($haystack, $needles) |
|
| 144 | { |
|
| 145 | foreach ((array) $needles as $currentNeedle) |
|
| 146 | { |
|
| 147 | if (strpos($haystack, $currentNeedle) === 0) { |
|
| 148 | return true; |
|
| 149 | } |
|
| 150 | } |
|
| 151 | ||
| 152 | return false; |
|
| 153 | } |
|
| 154 | } |
|
| 155 | ||
| 156 | if (!function_exists('endsWith')) { |
|
| 157 | function endsWith($haystack, $needles) |
|