home *** CD-ROM | disk | FTP | other *** search
- /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
- | Copyright (c) 1987-1991, Innovative Data Concepts, Inc.
- | All Rights Reserved.
- |
- | This Library is part of IDC's TesSeRact Development Tools product
- | line. For information about other IDC products, call 1-215-443-9705.
- *-V--------------------------------------------------------------------*
- | $Header: tcxlstr.h 552.0 17 Mar 1991 18:26:52 $
- |
- | $Log: tcxlstr.h $
- *-D--------------------------------------------------------------------*
- | <TCXLstr.h> : Prototypes for TCXL string functions.
- *-N-----------------------[ Notes and Caveats ]------------------------*
- |
- *======================================================================*/
- #ifndef _TCXLstr_
- # define _TCXLstr_ 1
- # ifndef _TCXLdef_
- # include <TCXLdef.h>
- # endif
-
- /*------------------------[ Function prototypes ]-----------------------*/
-
- #ifdef __cplusplus /* no mangling, please */
- extern "C" {
- #endif
- /*- General string operations ------------*/
- FlgT CTYP strblank(ChrP s); /* TRUE if blank */
- ChrP CTYP strbmatch(ChrP s, /* Find best match */
- ChrP a[]);
- ChrP strbtrim(ChrP s); /* Trim leading/trailing space */
- ChrP CTYP strcode(ChrP s, ChrP k); /* Encode/decode with key <k> */
- ChrP CTYP strins(ChrP a, ChrP s, /* Insert string <s> at pos <p> */
- IntT p);
- ChrP strleft(ChrP s, IntT n); /* Create left substring */
- ChrP CTYP strljust(ChrP s); /* Left-justify */
- ChrP CTYP strltrim(ChrP s); /* Trim leading spaces */
- IntT CTYP strmatch(ChrP a, ChrP b); /* Test for match */
- ChrP CTYP strmid(ChrP s, IntT p, /* Create substring */
- IntT n);
- ChrP strright(ChrP s, IntT n); /* Create right substring */
- ChrP CTYP strrjust(ChrP s); /* Right-jstify */
- ChrP CTYP strrol(ChrP s, IntT n); /* Rotate left <n> chars */
- ChrP CTYP strror(ChrP s, IntT n); /* Rotate right <n> chars */
- ChrP strrtrim(ChrP s); /* Trim trailing spaces */
- ChrP CTYP strsetsz(ChrP s, IntT n); /* Adjust size */
- ChrP CTYP strshl(ChrP s, IntT n); /* Shift left <n> chars */
- ChrP CTYP strshr(ChrP s, IntT n); /* Shift right <n> chars */
- ChrP CTYP strtrim(ChrP s); /* Trin trailng spaces */
- ChrP CTYP struplow(ChrP s); /* Convert to intial-caps */
- /*- Case-dependent string operations -----*/
- IntT CTYP strchg(ChrP s, ChrT a, /* Change all char <a> to <b> */
- ChrT b);
- DwdT CTYP strchksum(ChrP s); /* Checksum */
- ChrP CTYP strdel(ChrP a, ChrP s); /* Delete substring <s> */
- ChrP CTYP strdela(ChrP a, ChrP s); /* Delete all substrings <s> */
- ChrP CTYP strinc(ChrP a, ChrP s); /* Find substring <s> */
- IntT CTYP strocc(ChrP s, ChrT c); /* Count instances of char <c> */
- ChrP CTYP strschg(ChrP s, ChrP a, /* Change all strings <a> to <b> */
- ChrP b);
- IntT CTYP strsocc(ChrP a, ChrP s); /* Count instances of string <s> */
- ChrP CTYP strsrep(ChrP s, ChrP a, /* Replace string <a> with <b> */
- ChrP b);
- /*- Case-independent string operations ---*/
- IntT CTYP strichg(ChrP s, ChrT a, /* Change all char <a> to <b> */
- ChrT b);
- DwdT CTYP strichksum(ChrP s); /* Checksum */
- ChrP CTYP stridel(ChrP a, ChrP b); /* Delete substring <s> */
- ChrP CTYP stridela(ChrP a, ChrP b); /* Delete all substrings <s> */
- ChrP CTYP striinc(ChrP a, ChrP s); /* Find substring <s> */
- IntT CTYP striocc(ChrP s, ChrT c); /* Count instances of char <c> */
- ChrP CTYP strischg(ChrP s, ChrP a, /* Change all strings <a> to <b> */
- ChrP b);
- IntT CTYP strisocc(ChrP a, ChrP s); /* Count instances of string <s> */
- ChrP CTYP strisrep(ChrP s, ChrP a, /* Replace string <a> with <b> */
- ChrP b);
- #define strbtrim(s) strtrim(strltrim(s))
- #define strleft(s,n) strmid(s,0,n)
- #define strright(s,n) strmid(s,strlen(s)-n,n)
- #define strrtrim(s) strtrim(s)
- #ifdef __cplusplus
- }
- #endif
- #endif /* _TCXLstr_ : End of TCXLstr.h -------------------------------*/
-