home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name stcsub -- Extract a substring
- *
- * Synopsis amov = stcsub(ptarget,psource,cpos,cnt,tarsize);
- *
- * int amov Actual number of characters extracted
- * char *ptarget Pointer to returned string
- * char *psource Pointer to source string
- * int cpos Starting position in source string
- * int cnt Number of characters to extract
- * int tarsize Maximum length of the target string
- *
- * Description This function extracts a substring of length cnt from
- * the source string starting at position cpos and returns
- * the result in the target string. Successive calls are
- * made to STCRIGHT and STCLEFT so that cpos and cnt are
- * guaranteed to produce meaningful results.
- *
- * Returns amov Number of characters extracted
- * ptarget Pointer to extracted string.
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bstring.h>
-
- int stcsub(ptarget,psource,cpos,cnt,tarsize)
- char *ptarget,*psource;
- int cpos,cnt,tarsize;
- {
- stcright(ptarget,psource,cpos,tarsize);
-
- return(stcleft(ptarget,ptarget,cnt,tarsize));
- }