home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / CEREBRUM / WAT9609.ZIP / ELIB / ISSTRING.C < prev    next >
Text File  |  1994-11-28  |  387b  |  19 lines

  1. #include <stdio.h>
  2. #include <ctype.h>
  3. #include <string.h>
  4.  
  5. int isstring( char *string, unsigned stringlen )
  6. {
  7.     if ( (unsigned) strlen( string ) > stringlen - 1 ) return( 0 );
  8.  
  9.     while ( *string ) {
  10.         if ( !isprint( *string++ )) {
  11.             string--;
  12.             if ( !isspace( *string++ ))
  13.                 return( 0 );
  14.         }
  15.     }
  16.     return( 1 );
  17. }
  18.  
  19.