home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!umn.edu!cybrspc!roy
- From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail)
- Newsgroups: comp.lang.c
- Subject: Re: Problem with string processing.
- Message-ID: <2mqVwB6w165w@cybrspc.UUCP>
- Date: Mon, 04 Jan 93 19:14:36 CST
- References: <1993Jan4.022737.19792@kpc.com>
- Organization: Villa CyberSpace, Minneapolis, MN
- Lines: 20
-
- hollasch@kpc.com (Steve Hollasch) writes:
-
- > while (*ptr++ = *str++); /* Note assign op and null body. */
-
- (nice touch, BTW) How does this differ from 'strcpy(ptr, str)' besides
- the function call overhead?
-
- And just for the heck of it....
-
- Assuming a large enough string for the append, and low-high byte ordering,
- would this work?
-
- strcat(str,(char *)&ch);
-
- (or have I been drinking too much coffee again? :-} )
- --
- Roy M. Silvernail | #include <stdio.h> | "press to test"
- roy%cybrspc@cs.umn.edu | main(){ | <click>
- cybrspc!roy@cs.umn.edu | float x=1; | "release
- | printf("Just my $%.2f.\n",x/50);} | to detonate"
-