• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integrity/duplicatepersoncriterion.php
  • Класс: Bitrix\Crm\Integrity\DuplicatePersonCriterion
  • Вызов: DuplicatePersonCriterion::prepareCode
static function prepareCode($name)
{
	if(!is_string($name))
	{
		throw new Main\ArgumentTypeException('name', 'string');
	}

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

	return preg_replace('/[ ]+/' .BX_UTF_PCRE_MODIFIER, ' ',
			mb_strtolower(rtrim(trim($name), '.')));
}