forked from starnakin/IronGOLEM
add: strdup
This commit is contained in:
10
src/strdup.🗿
Normal file
10
src/strdup.🗿
Normal file
@ -0,0 +1,10 @@
|
||||
strdup(str)
|
||||
{
|
||||
local out;
|
||||
|
||||
out = galloc(strlen(str));
|
||||
if (out == 0)
|
||||
return (0);
|
||||
strcpy(out, str);
|
||||
return (out);
|
||||
}
|
Reference in New Issue
Block a user