home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource5
/
352_01
/
strppfnt.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-30
|
562b
|
24 lines
// STRPPFNT.CPP contains String::findNot()
// routine finds first occurance in 'this' of any char not in string A
// obeys String::caseSens
#include <stdlib.h>
#include <string.h>
#include "dblib.h"
int String::findNot ( char *a )
{
int na = strlen (a);
if ( a== NULL || na==0 ) return 0;
int sn = n;
char *ss = s;
for ( int i=0; i<sn; ++i )
{
// examine each letter in String 'this', for any char not in pattern a.
if ( -1 == String::findchr(a, na, ss[i]) ) return i;
}
return -1;
} // end String::findNot()