home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / txcl552 / inc / tcxlstr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-15  |  4.5 KB  |  86 lines

  1. /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
  2.  | Copyright (c) 1987-1991, Innovative Data Concepts, Inc.
  3.  | All Rights Reserved.
  4.  |
  5.  | This Library is part of IDC's TesSeRact Development Tools product
  6.  | line. For information about other IDC products, call  1-215-443-9705.
  7.  *-V--------------------------------------------------------------------*
  8.  | $Header:   tcxlstr.h     552.0   17 Mar 1991 18:26:52  $
  9.  |
  10.  | $Log:   tcxlstr.h    $
  11.  *-D--------------------------------------------------------------------*
  12.  | <TCXLstr.h> : Prototypes for TCXL string functions.
  13.  *-N-----------------------[ Notes and Caveats ]------------------------*
  14.  |
  15.  *======================================================================*/
  16. #ifndef  _TCXLstr_
  17. #  define   _TCXLstr_ 1
  18. #  ifndef   _TCXLdef_
  19. #     include  <TCXLdef.h>
  20. #  endif
  21.  
  22. /*------------------------[ Function prototypes ]-----------------------*/
  23.  
  24. #ifdef __cplusplus                     /* no mangling, please           */
  25.    extern   "C"   {
  26. #endif
  27.                               /*- General string operations ------------*/
  28. FlgT  CTYP  strblank(ChrP s);          /* TRUE if blank                 */
  29. ChrP  CTYP  strbmatch(ChrP s,          /* Find best match               */
  30.    ChrP a[]);
  31. ChrP        strbtrim(ChrP s);          /* Trim leading/trailing space   */
  32. ChrP  CTYP  strcode(ChrP s, ChrP k);   /* Encode/decode with key <k>    */
  33. ChrP  CTYP  strins(ChrP a, ChrP s,     /* Insert string <s> at pos <p>  */
  34.    IntT p);
  35. ChrP        strleft(ChrP s, IntT n);   /* Create left substring         */
  36. ChrP  CTYP  strljust(ChrP s);          /* Left-justify                  */
  37. ChrP  CTYP  strltrim(ChrP s);          /* Trim leading spaces           */
  38. IntT  CTYP  strmatch(ChrP a, ChrP b);  /* Test for match                */
  39. ChrP  CTYP  strmid(ChrP s, IntT p,     /* Create substring              */
  40.    IntT n);
  41. ChrP        strright(ChrP s, IntT n);  /* Create right substring        */
  42. ChrP  CTYP  strrjust(ChrP s);          /* Right-jstify                  */
  43. ChrP  CTYP  strrol(ChrP s, IntT n);    /* Rotate left <n> chars         */
  44. ChrP  CTYP  strror(ChrP s, IntT n);    /* Rotate right <n> chars        */
  45. ChrP        strrtrim(ChrP s);          /* Trim trailing spaces          */
  46. ChrP  CTYP  strsetsz(ChrP s, IntT n);  /* Adjust size                   */
  47. ChrP  CTYP  strshl(ChrP s, IntT n);    /* Shift left <n> chars          */
  48. ChrP  CTYP  strshr(ChrP s, IntT n);    /* Shift right <n> chars         */
  49. ChrP  CTYP  strtrim(ChrP s);           /* Trin trailng spaces           */
  50. ChrP  CTYP  struplow(ChrP s);          /* Convert to intial-caps        */
  51.                               /*- Case-dependent string operations -----*/
  52. IntT  CTYP  strchg(ChrP s, ChrT a,     /* Change all char <a> to <b>    */
  53.    ChrT b);
  54. DwdT  CTYP  strchksum(ChrP s);         /* Checksum                      */
  55. ChrP  CTYP  strdel(ChrP a, ChrP s);    /* Delete substring <s>          */
  56. ChrP  CTYP  strdela(ChrP a, ChrP s);   /* Delete all substrings <s>     */
  57. ChrP  CTYP  strinc(ChrP a, ChrP s);    /* Find substring <s>            */
  58. IntT  CTYP  strocc(ChrP s, ChrT c);    /* Count instances of char <c>   */
  59. ChrP  CTYP  strschg(ChrP s, ChrP a,    /* Change all strings <a> to <b> */
  60.    ChrP b);
  61. IntT  CTYP  strsocc(ChrP a, ChrP s);   /* Count instances of string <s> */
  62. ChrP  CTYP  strsrep(ChrP s, ChrP a,    /* Replace string <a> with <b>   */
  63.    ChrP b);
  64.                               /*- Case-independent string operations ---*/
  65. IntT  CTYP  strichg(ChrP s, ChrT a,    /* Change all char <a> to <b>    */
  66.    ChrT b);
  67. DwdT  CTYP  strichksum(ChrP s);        /* Checksum                      */
  68. ChrP  CTYP  stridel(ChrP a, ChrP b);   /* Delete substring <s>          */
  69. ChrP  CTYP  stridela(ChrP a, ChrP b);  /* Delete all substrings <s>     */
  70. ChrP  CTYP  striinc(ChrP a, ChrP s);   /* Find substring <s>            */
  71. IntT  CTYP  striocc(ChrP s, ChrT c);   /* Count instances of char <c>   */
  72. ChrP  CTYP  strischg(ChrP s, ChrP a,   /* Change all strings <a> to <b> */
  73.    ChrP b);
  74. IntT  CTYP  strisocc(ChrP a, ChrP s);  /* Count instances of string <s> */
  75. ChrP  CTYP  strisrep(ChrP s, ChrP a,   /* Replace string <a> with <b>   */
  76.    ChrP b);
  77. #define  strbtrim(s)    strtrim(strltrim(s))
  78. #define  strleft(s,n)   strmid(s,0,n)
  79. #define  strright(s,n)  strmid(s,strlen(s)-n,n)
  80. #define  strrtrim(s)    strtrim(s)
  81. #ifdef   __cplusplus
  82.    }
  83. #endif
  84. #endif   /* _TCXLstr_ : End of TCXLstr.h -------------------------------*/
  85.  
  86.