• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/text/string.php
  • Класс: BitrixMainTextString
  • Вызов: String::strrpos
static function strrpos($haystack, $needle)
{
	if (defined("BX_UTF"))
	{
		//mb_strrpos does not work on invalid UTF-8 strings
		$ln = strlen($needle);
		for ($i = strlen($haystack) - $ln; $i >= 0; $i--)
			if (substr($haystack, $i, $ln) == $needle)
				return $i;

		return false;
	}

	return strrpos($haystack, $needle);
}