Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- size_t l=(size_t) insertLength;
- size_t m=(size_t) strlen(src);
- int i=0;
- int j=0;
- char * result1=(char *) malloc ((l+m)*sizeof(char));
- char * result2;
- copyStringWithLength(result1,src,strlen(src)+1);
- for(j=insertPosition; j<insertPosition+insertLength; j++)
- {
- result1[j+insertLength]=result1[j];
- result1[j]=toBeInserted[i];
- i++;
- }
- result2=result1;
- return result2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement