copy = concatenate ?  This is a discussion on copy = concatenate
? within the C Programming forums, part of the General
Programming Boards category; As a newbye, I've justed started
writing some code. Instead of writing 2 different functions for
COPY and CONCATENATE string, ...    1. #1     Registered User
Join Date     Oct 2006      Question copy = concatenate ?
As a newbye, I've justed started writing some code.     Instead
of writing 2 different functions for COPY and CONCATENATE
string, I'm trying one that will do both:     a) if destination
is empty then it will be a simple copy from original string to
destination,     b) if destination is not empty, then a
concatenation applies.      So, my code is as follows:
#include <stdio.h>      // a CONCATENATE function is similar to
a COPY function, with the only     // difference that the copy
to destination starts on first empty index      char
*f_strcpy(char *v_string)       int length = 0; // determines
what is actual length of destination strin