We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70b1b86 commit 8d2c953Copy full SHA for 8d2c953
src/helpers.php
@@ -7,6 +7,17 @@ function clean_content_type($content_type){
7
return trim(preg_replace('@;.*@', '', $content_type));
8
}
9
10
+function starts_with($haystack, $needles){
11
+ foreach( (array)$needles as $n){
12
+ if($n !== '' && stripos($haystack, $n) === 0){
13
+ return true;
14
+ }
15
16
+
17
+ return false;
18
+}
19
20
21
function is_html($content_type){
22
return clean_content_type($content_type) == 'text/html';
23
0 commit comments