[ Manpage overview ] [ To start of mcntp pages ]
Table of Contents

Name

stripcr - strip first \n from string

Synopsis

#include <mysting.h>

char *
stripcr(char *s1)

char *
striprcr(char *s1)

Description

The stripcr() and striprcr() functions replace both the character \n in a string with the character \0. While stripcr() is doing this with the first occurrence of \n in s1, striprcr() is doing it with the rightmost one. If no \n can be found, the string s1 is not modified.

Return Values

Both functions return their argument.

See Also

index(3) , rindex(3)

History

The stripcr() and striprcr() functions are part of MCNTP, the diploma thesis Transport of NetNews via IP-multicast of the author.

Author

Heiko W.Rupp (hwr@pilhuhn.de)

Bugs

None known yet. If you find any, then please report them to <mcntpbugs@pilhuhn.de>


Table of Contents

$Id: stripcr.3.html,v 1.5 2001/11/22 10:24:37 pilhuhn Exp $