delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
From: | "Marp" <marp AT 0 DOT 0 DOT 0 DOT 0> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: *Newbie= Why isn't this small function working correctly? |
Date: | Tue, 18 Dec 2001 15:38:54 -0500 |
Organization: | MindSpring Enterprises |
Lines: | 26 |
Message-ID: | <9vo9gr$p7e$1@slb1.atl.mindspring.net> |
References: | <20011218200551 DOT 38218 DOT qmail AT web13907 DOT mail DOT yahoo DOT com> <Xns917B9BF02CCE5ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> |
NNTP-Posting-Host: | 3f.b2.e0.d6 |
X-Server-Date: | 18 Dec 2001 20:38:51 GMT |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4807.1700 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4807.1700 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
"A. Sinan Unur" <asu1 AT cornell DOT edu> wrote in message news:Xns917B9BF02CCE5ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8... <snip> > there is nothing wrong with > > strncpy(new_string, string + start_offset, end_offset - start_offset) Don't forget to include the null char at the end because strncpy won't always do that for you. new_string[end_offset] = '\0'; > > HTH. > > Sinan. > -- > -------------------------------- > A. Sinan Unur > http://www.unur.com/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |