home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / cxl-1.zip / CXLSTR.H < prev    next >
Text File  |  1989-03-27  |  3KB  |  79 lines

  1. /*
  2.    ┌──────────────────────────────────────────────────────────────────────────┐
  3.    │                                                                          │
  4.    │  CXLSTR.H  -  CXL is Copyright (c) 1987-1989 by Mike Smedley.            │
  5.    │                                                                          │
  6.    │  This header file contains function prototypes and definitions for       │
  7.    │  string manipulating functions.                                          │
  8.    │                                                                          │
  9.    └──────────────────────────────────────────────────────────────────────────┘
  10. */
  11.  
  12. #if defined(__TURBOC__)                         /* Turbo C */
  13.     #if __STDC__
  14.         #define _Cdecl
  15.     #else
  16.         #define _Cdecl  cdecl
  17.     #endif
  18.     #define _Near
  19. #elif defined(__ZTC__)                          /* Zortech C++ */
  20.     #define _Cdecl
  21.     #define _Near
  22. #elif defined(M_I86) && !defined(__ZTC__)       /* Microsoft C/QuickC */
  23.     #if !defined(NO_EXT_KEYS)
  24.         #define _Cdecl  cdecl
  25.         #define _Near   near
  26.     #else
  27.         #define _Cdecl
  28.         #define _Near
  29.     #endif
  30. #elif defined(__POWERC__)                       /* Power C */
  31.     #define _Cdecl
  32.     #define _Near
  33. #endif
  34.  
  35. /*---------------------------[ function prototypes ]-------------------------*/
  36.  
  37. int      _Cdecl cvaltype(int ch,int ctype);
  38. double   _Cdecl cvtcf(char *field,int wholesize,int fracsize);
  39. int      _Cdecl cvtci(char *field);
  40. void     _Cdecl cvtfc(char *field,double value,int wholesize,int fracsize);
  41. void     _Cdecl cvtic(char *field,int value,int size);
  42. int      _Cdecl strblank(char *str);
  43. char    *_Cdecl strbmatch(char *str,char *strarr[]);
  44. int      _Cdecl strchg(char *str,int oldch,int newch);
  45. unsigned long _Cdecl strchksum(char *str);
  46. char    *_Cdecl strcode(char *str,char *key);
  47. char    *_Cdecl strdel(char *substr,char *str);
  48. int      _Cdecl strichg(char *str,int oldch,int newch);
  49. unsigned long _Cdecl strichksum(char *str);
  50. char    *_Cdecl stridel(char *substr,char *str);
  51. char    *_Cdecl striinc(char *str1,char *str2);
  52. char    *_Cdecl strinc(char *str1,char *str2);
  53. char    *_Cdecl strins(char *instr,char *str,int st_pos);
  54. int      _Cdecl striocc(char *str,int ch);
  55. int      _Cdecl strisocc(char *str1,char *str2);
  56. char    *_Cdecl strisrep(char *str,char *search,char *replace);
  57. char    *_Cdecl strljust(char *str);
  58. char    *_Cdecl strltrim(char *str);
  59. int      _Cdecl strmatch(char *str1,char *str2);
  60. char    *_Cdecl strmid(char *str,int st_pos,int num_chars);
  61. int      _Cdecl strocc(char *str,int ch);
  62. char    *_Cdecl strrjust(char *str);
  63. char    *_Cdecl strrol(char *str,int count);
  64. char    *_Cdecl strror(char *str,int count);
  65. char    *_Cdecl strsetsz(char *str,int newsize);
  66. char    *_Cdecl strshl(char *str,int count);
  67. char    *_Cdecl strshr(char *str,int count);
  68. int      _Cdecl strsocc(char *str1,char *str2);
  69. char    *_Cdecl strsrep(char *str,char *search,char *replace);
  70. char    *_Cdecl strtrim(char *str);
  71. char    *_Cdecl struplow(char *str);
  72. int      _Cdecl touplow(char *str,char *pos,int ch);
  73.  
  74. /*-----------------------[ macro-function definitions ]----------------------*/
  75.  
  76. #define strleft(st,nu)      strmid(st,0,nu)
  77. #define strright(st,nu)     strmid(st,strlen(st)-nu,nu)
  78. #define strrtrim(st)        strtrim(st)
  79.