home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 352_01 / strppmcp.cpp < prev    next >
C/C++ Source or Header  |  1991-04-24  |  642b  |  19 lines

  1. // STRPPMCP.CPP - this module contains String::memcmp()
  2. //        This routine compares two areas of memory 
  3. //        exactly like ANSI C memcmp() but determines whether to use
  4. //        case Sensitive compare or not bassed on whether String::caseSens is ON
  5. //
  6. #include <stdlib.h>
  7. #include <string.h>
  8.  
  9. #include "dblib.h"
  10.             
  11.     
  12. // NOTE: routine declared static in class {}. No 'this' ptr.        
  13. int String::memcmp (char *a, char *b, int nb)
  14.         // String::memcmp compares two memory areas
  15.         // checking for caseSens comparison. Note scope resolution.
  16.         {
  17.         return String::caseSens ? ::memcmp(a,b,nb) : memicmp(a,b,nb);
  18.         }        // end String::memcmp()
  19.