home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 48
/
Amiga_Dream_48.iso
/
Atari
/
c
/
sozobon-v2
/
dlibsrc.lha
/
STRTRIM.C
< prev
next >
Wrap
C/C++ Source or Header
|
1988-10-05
|
309b
|
19 lines
char *strtrim(string, junk)
register char *string;
register char *junk;
{
register char *p = string;
char *strchr(), *strrchr();
while(*p && strchr(junk, *p))
++p;
if(*p)
{
string = strrchr(p, '\0');
while(strchr(junk, *--string))
;
*++string = '\0';
}
return(p);
}