mb_strlen() 공개 정적인 메소드

Calls mb_substr if available and falls back to substr if not.
public static mb_strlen ( string $string ) : integer
$string string
리턴 integer
 public function checkName($name)
 {
     if (empty($name)) {
         throw new Exception(Piwik::translate("General_PleaseSpecifyValue", "name"));
     }
     if (Common::mb_strlen($name) > 100) {
         throw new Exception(Piwik::translate("CustomAlerts_ParmeterIsTooLong", array(Piwik::translate('General_Name'), 100)));
     }
 }
예제 #2
0
파일: Cloud.php 프로젝트: piwik/piwik
 /**
  * @param $word
  * @return string
  */
 private function truncateWordIfNeeded($word)
 {
     $word = Common::unsanitizeInputValue($word);
     if (Common::mb_strlen($word) > $this->truncatingLimit) {
         return Common::mb_substr($word, 0, $this->truncatingLimit - 3) . '...';
     }
     return $word;
 }
예제 #3
0
파일: Cloud.php 프로젝트: carriercomm/piwik
 /**
  * @param $word
  * @return string
  */
 private function truncateWordIfNeeded($word)
 {
     if (Common::mb_strlen($word) > $this->truncatingLimit) {
         return Common::mb_substr($word, 0, $this->truncatingLimit - 3) . '...';
     }
     return $word;
 }