Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
binarystring.php
1<?php
8namespace Bitrix\Main\Text;
9
14{
20 public static function getLength($str)
21 {
22 return strlen($str);
23 }
24
32 public static function getSubstring($str, $start, ...$args)
33 {
34 return substr($str, $start, ...$args);
35 }
36
44 public static function getPosition($haystack, $needle, $offset = 0)
45 {
46 return strpos($haystack, $needle, $offset);
47 }
48
56 public static function getLastPosition($haystack, $needle, $offset = 0)
57 {
58 return strrpos($haystack, $needle, $offset);
59 }
60
68 public static function getPositionIgnoreCase($haystack, $needle, $offset = 0)
69 {
70 return stripos($haystack, $needle, $offset);
71 }
72
80 public static function getLastPositionIgnoreCase($haystack, $needle, $offset = 0)
81 {
82 return strripos($haystack, $needle, $offset);
83 }
84
90 public static function changeCaseToLower($str)
91 {
92 return strtolower($str);
93 }
94}
static getLastPositionIgnoreCase($haystack, $needle, $offset=0)
static getLastPosition($haystack, $needle, $offset=0)
static getPositionIgnoreCase($haystack, $needle, $offset=0)
static getPosition($haystack, $needle, $offset=0)
static getSubstring($str, $start,... $args)