Re:Rust 1.17
by jandrese on Thursday April 27, 2017 @01:51PM
(#14213409)
This is how concat() works in the C library, except that in the case where the original string is too long it will overwrite random memory instead of reallocating the original string.
[ Parent
| on HN ]
You probably mean strcat() (which should really not be used, since now there is strncat()), there is no concat() in standard C library. strcat() does not intercept syntax of operation that does not mutate its arguments in any other context (+), you also cannot do strcat("hello,", " world") since the first argument must be mutable.