Extracts a substring out of STR
and returns it. First character is at offset 0.
If OFFSET
is negative, starts
that far from the end of the string.
If LENGTH
is
omitted, returns everything to the end of the
string. If LENGTH
is negative,
leaves that many characters off the end of the string.
If OFFSET
and
LENGTH
specify a substring that is
partly outside the string, only the part within
the string is returned. If the substring is
beyond either end of the string, substr() returns
empty string and produces a warning.