home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
clipper
/
rettig
/
source
/
_tr_atla.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-21
|
764b
|
25 lines
/*********
* _TR_ATLAST
* by Leonard Zerman
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* Syntax: _tr_atlast( <*C>, <*C> )
* Return: The last position of a character found in a string.
* Note : Returns 0 if not found, -1 if error.
********/
#include "trlib.h"
_tr_atlast(c,instr) /* declare the atlast function */
char *instr; /* pointer to the passed string */
char *c; /* pointer to the char to be found */
{
int i;
for (i = _tr_strlen(instr); instr[i] != *c && i >= 0 ; i--)
; /* empty loop checking for condition */
return( ++i );
}
/* eof */