]> git.nbdom.net Git - nb.git/commitdiff
str_match
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 27 Jul 2016 10:58:51 +0000 (12:58 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 27 Jul 2016 10:58:51 +0000 (12:58 +0200)
lib/php/nb.php

index 628a280cdfc5e2996246df045446dd35e008cff7..76be10a4e418e5a2ebc32c62aec2049aeba2436c 100644 (file)
@@ -560,19 +560,18 @@ class NB {
 
       // Match
       } elseif(preg_match('/['.preg_quote('*?[]!').']/',$pattern)) {
-
-        #if (strpos($pattern,'*') !== false or strpos($pattern,'') !== false
         $match = fnmatch($pattern,$string,FNM_CASEFOLD);
-      #var_dump($not);
 
       // Default
       } else {
+
         if (strtolower($pattern)=='null') {
           $pattern = '';
           if (!$string) $string = 0;
         }
-        #debug("$pattern = $string");
+
         $match = (strtolower($pattern) == strtolower($string));
+
       }
 
       return (bool)($not ? !$match : $match);