Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/yandex.market/lib/export/run/helper/ |
Upload File : |
<?php namespace Yandex\Market\Export\Run\Helper; class BinaryString { public static function getLength($str) { return \function_exists('mb_strlen') ? mb_strlen($str, 'latin1') : strlen($str); } public static function getSubstring($str, $start, $length = null) { if (\function_exists('mb_substr')) { if ($length === null) { $length = static::getLength($str); } $result = mb_substr($str, $start, $length, 'latin1'); } else if ($length !== null) { $result = substr($str, $start, $length); } else { $result = substr($str, $start); } return $result; } public static function getPosition($haystack, $needle, $offset = 0) { if (\function_exists('mb_orig_strpos')) { $result = mb_orig_strpos($haystack, $needle, $offset); } else if (\function_exists('mb_strpos')) { $result = mb_strpos($haystack, $needle, $offset, 'latin1'); } else { $result = strpos($haystack, $needle, $offset); } return $result; } }