static char Sccsid
[] "@(#)substr 2.2";
Place the `len' length substring of `as' starting at `as[origin]'
Note: The copying of as to aresult stops if either the
specified number (len) characters have been copied,
or if the end of as is found.
A negative len generally guarantees that everything gets copied.
char *substr(as
, aresult
, origin
, len
)
register char *s
, *result
;
while (--len
&& (*result
++ = *s
++)) ;