lib/PHPWord/PHPWord/Shared/String.php
public static function CountCharacters($value, $enc = 'UTF-8')
	{
		if (self::getIsMbstringEnabled()) {
			$count = mb_strlen($value, $enc);
			return $count;
		}

		if (self::getIsIconvEnabled()) {
			$count = iconv_strlen($value, $enc);
			return $count;
		}

		// else strlen
		$count = strlen($value);
		return $count;
	}
public static function CountCharacters($value, $enc = 'UTF-8')
	{
		if (self::getIsMbstringEnabled()) {
			$count = mb_strlen($value, $enc);
			return $count;
		}

		if (self::getIsIconvEnabled()) {
			$count = iconv_strlen($value, $enc);
			return $count;
		}

		// else strlen
		$count = strlen($value);
		return $count;
	}
public static function CountCharacters ( $ value , $ enc = 'UTF-8' ) { if ( self :: getIsMbstringEnabled ( ) ) { $ count = mb_strlen ( $ value , $ enc ) ; return $ count ; } if ( self :: getIsIconvEnabled ( ) ) { $ count = iconv_strlen ( $ value , $ enc ) ; return $ count ; } // else strlen $ count = strlen ( $ value ) ; return $ count ; }
Get character count. First try mbstring, then iconv, finally strlen

@param string $value
@param string $enc Encoding
@return int Character count
Get character count . First try mbstring then iconv finally strlen