Duplicate a string
char *SLmake_string (char *s)
The SLmake_string
function creates a new copy of the string
s
, via malloc
, and returns it. Upon failure it returns
NULL
. Since the resulting string is malloced, it should be
freed when nolonger needed via a call to either free
or
SLfree
.
SLmake_string
should not be confused with the function
SLang_create_slstring
, which performs a similar function.
SLmake_nstring, SLfree, SLmalloc, SLang_create_slstring