getSubstring
string public static \Bitrix\Main\Text\BinaryString::getSubstring( $str, $start );
Static method. Returns str
substring, starting from start
character or false in case of error or an empty string. Executes safe operation in terms of multibyte character sets. Analog to PHP substr function.
Parameters
Parameter | Description | Version |
---|---|---|
$str | Input string. Must contain at least a single character. | |
$start | When value is negative, the returned substring starts from indicated position from string start, zero onwards. For example, the string abcdef , has the character a in the 0 position, c character - in position 2 and etc. When value is negative, the retuned substring starts from position offset for a specified number of characters from the end of string .When string is less or equal to start characters, returns false. |
Example
© «Bitrix24», 2001-2024