[email protected] wrote:

>
>
>       char buf[] = "foo";
>
>       strcpy(buf+3, buf);
>
> It's clearly not useful.

OK, but this is a well known case that nobody should be interested in.
 
> You want this to work:
>
>       char buf[] = "foo\\abaz"";
>
>       strcpy(buf+4, buf+5);  /* Remove "\" at position 4. */

This is the typical use case for overlapping strings.


Jörg

-- 
 EMail:[email protected] (home) Jörg Schilling D-13353 Berlin
       [email protected]                (uni)  
       [email protected] (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to