J
John Smith
Hi all
Why doesn't this seem to work?
void stripnl(char *sz)
{
char *nl;
nl = strchr(sz, '\n');
if (nl)
{
*nl = '\0';
}
}
The string fed in still has the newline after calling this function.
Thanks
John
Why doesn't this seem to work?
void stripnl(char *sz)
{
char *nl;
nl = strchr(sz, '\n');
if (nl)
{
*nl = '\0';
}
}
The string fed in still has the newline after calling this function.
Thanks
John