Syntax
string substr ( string str, int start, int length )
Description
substr returns the substring of a given length starting at a given position in the string.
Example
printf("%s\n",substr ("xxxfooxxx",3,3))
Returns "foo".
printf(%s\n",substr (xxxfooxxx",3,-1))
-1 returns the remainder of the string, "fooxxx".