• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/Calc/Libs/StringLib.php
  • Класс: BitrixBizprocCalcLibsStringLib
  • Вызов: StringLib::callSubstr
public function callSubstr(Arguments $args)
{
	$str = $args->getFirstSingle();
	$pos = (int)$args->getSecond();
	$len = (int)$args->getThird();

	if (is_array($str))
	{
		return null;
	}

	if (!$str)
	{
		return '';
	}

	if ($len)
	{
		return mb_substr($str, $pos, $len);
	}

	return mb_substr($str, $pos);
}