home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource4
/
273_01
/
striprng.cc
< prev
next >
Wrap
Text File
|
1987-09-27
|
336b
|
15 lines
striprange(char *str,char clo,char chi)
/* This will strip all occurances of the characters that fall between
char clo and chi out of the string pointed to by *str.
*/
{
char *newstr;
newstr = str;
while (*str) {
if ((*str > chi) | (*str < clo))
*newstr++ = *str;
str++; }
*newstr = '\0';
}