• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/search/searchmap.php
  • Класс: Bitrix\Crm\Search\SearchMap
  • Вызов: SearchMap::addTextFragments
public function addTextFragments($value)
{
	if(!is_string($value))
	{
		$value = (string)$value;
	}

	if($value === '')
	{
		return;
	}

	$length = mb_strlen($value);

	//Right bound. We will stop when 3 characters are left.
	$bound = $length - 2;
	if($bound > 0)
	{
		for($i = 0; $i < $bound; $i++)
		{
			$fragment = mb_substr($value, $i);
			if(!isset($this->data[$fragment]))
			{
				$this->addText($fragment);
			}
		}
	}
}