home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
prof_c
/
util
/
nlerase.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1988-08-11
|
236 b
|
19 lines
/*
* nlerase -- replace the first newline in a string
* with a null character
*/
char *
nlerase(s)
char *s;
{
register char *cp;
cp = s;
while (*cp != '\n' && *cp != '\0')
++cp;
*cp = '\0';
return (s);
}