Scalar. Returns a substring of a given string, based on a start position and number of characters.
substr ( string, position, number )
string | A string. |
position | The starting position to start taking a substring. The first character or space in a string is in position 0. |
number | The number of characters in the substring. |
Returns a substring of a given string, based on a start position and number of characters. The first argument must be a string, and the position and number arguments must be integers. The function returns a string.
substr ('thissubstring', 4, 3) returns 'sub'.