insert substring into string

M

Magix

how can I insert a substring into string ?E.g str_insert("WWW", MyStr, 3)
Can anyone provide the algorithm ?

Let say Mystr is "Testing"
the output will be TeWWWsting

void str_insert(const char *sourc,char *dest,int pos)
{
}

Thanks.
 
M

Magix

Magix said:
how can I insert a substring into string ?E.g str_insert("WWW", MyStr, 3)
Can anyone provide the algorithm ?

Let say Mystr is "Testing"
the output will be TeWWWsting

void str_insert(const char *sourc,char *dest,int pos)
{
}

Thanks.

I got the solution. Please ignore this post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top