it can not count string like :
"سلام this is سلام"
and only count english word when string have tow language charset.
it is better to change getLengh method like:
public function getLength()
{
if (null === $this->_length) {
$this->_length = preg_match_all('/\pL+/u',$this->getSource());
}
return $this->_length;
}
it can not count string like :
"سلام this is سلام"
and only count english word when string have tow language charset.
it is better to change getLengh method like:
public function getLength()
{
if (null === $this->_length) {
$this->_length = preg_match_all('/\pL+/u',$this->getSource());
}
return $this->_length;
}