home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Windows Gam…ming Gurus (2nd Edition)
/
Disc2.iso
/
msdn_vcb
/
samples
/
vc98
/
sdk
/
graphics
/
directx
/
tri3
/
lclib.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-07-14
|
847b
|
62 lines
/*
* Copyright (C) 1995, 1996 Microsoft Corporation. All Rights Reserved.
*
* File: lclib.h
*
*/
#include <windows.h>
#include "lclib.h"
char* LSTRCHR( const char* lpString, int bChar )
{
if( lpString != NULL )
{
while( *lpString != 0 )
{
if( *lpString == bChar )
{
return (char*)lpString;
}
lpString++;
}
}
return NULL;
} /* LSTRCHR */
char* LSTRRCHR( const char* lpString, int bChar )
{
if( lpString != NULL )
{
const char* lpBegin;
lpBegin = lpString;
while( *lpString != 0 )
{
lpString++;
}
while( 1 )
{
if( *lpString == bChar )
{
return (char*)lpString;
}
if( lpString == lpBegin )
{
break;
}
lpString--;
}
}
return NULL;
} /* LSTRRCHR */