www.delorie.com/archives/browse.cgi | search |
From: | Nate Eldredge <neldredge AT hmc DOT edu> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: strset function |
Date: | 15 Nov 1999 13:53:31 -0800 |
Organization: | InterWorld Communications |
Lines: | 16 |
Message-ID: | <83r9hr8lr8.fsf@mercury.st.hmc.edu> |
References: | <1e1batd DOT 137nbir1xiefqN AT d249 DOT paris-48 DOT cybercable DOT fr> <19b54f3c DOT 0c6b504d AT usw-ex0103-019 DOT remarq DOT com> <lNVX3.1117$0c2 DOT 30770 AT carnaval DOT risq DOT qc DOT ca> |
NNTP-Posting-Host: | mercury.st.hmc.edu |
X-Trace: | nntp1.interworld.net 942702878 62142 134.173.45.219 (15 Nov 1999 21:54:38 GMT) |
X-Complaints-To: | usenet AT nntp1 DOT interworld DOT net |
NNTP-Posting-Date: | 15 Nov 1999 21:54:38 GMT |
X-Newsreader: | Gnus v5.7/Emacs 20.4 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
alainm AT news DOT mcgill DOT ca (Alain Magloire) writes: > Malcolm (donald DOT mcleanNOdoSPAM AT talk21 DOT com DOT invalid) wrote: > : What does strset do ? I imagine it sets a string to all one > : character. This is easy to code > > Then, in that case you are better off with memset() which on most > OS/libc coded in assembly for speed. Not necessarily-- if you don't know the length of the string, you'd have to do `memset(s, 'X', strlen(s))', which requires making two passes over the string and could end up being slower. -- Nate Eldredge neldredge AT hmc DOT edu
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |