|
| iMatix home page | << | < | > | >> |
SFLVersion 2.11 |
#include "sflstr.h"
char *
replacechrswith (
char *strbuf,
char *chrstorm,
char chartorlcwith)
Subsitutes known char(s)in a string with another. Returns pointer to head of the buffer. Submitted by Scott Beasley jscottb@infoave.com
{
char *offset;
ASSERT (strbuf);
ASSERT (chrstorm);
offset = (char *)NULL;
while (*strbuf)
{
offset = strpbrk (strbuf, chrstorm);
if (offset)
{
*(offset)= chartorlcwith;
}
else
break;
}
return strbuf;
}
| | << | < | > | >> |
|