Piwik\Common::stringEndsWith PHP 메소드

stringEndsWith() 공개 정적인 메소드

public static stringEndsWith ( $haystack, $needle )
    public static function stringEndsWith($haystack, $needle)
    {
        if ('' === $needle) {
            return true;
        }
        $lastCharacters = substr($haystack, -strlen($needle));
        return $lastCharacters === $needle;
    }

Usage Example

예제 #1
0
파일: Sql.php 프로젝트: piwik/piwik
 public function __toString()
 {
     $sql = $this->sql;
     if (!Common::stringEndsWith($sql, ';')) {
         $sql .= ';';
     }
     return $sql;
 }
All Usage Examples Of Piwik\Common::stringEndsWith