substr()
function extracts a specific number of characters from a text.
text
is the specified text.start_position
is used as the starting position, specifying the part from which the substring will be returned. It is written as an int value.length
is used to determine the number of characters to be extracted. It can be one or more characters.text
is 1.length()
function returns the number of characters in a text.
length()
function will also count spaces.