News for hackers. Stuff that matters.
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.
Re:Rust 1.17 by mbel on Thursday April 27, 2017 @03:26PM (#14214032)
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.