core/sm_stringutil.cpp
changeset 504 1d6072ba774e
parent 474 b772dd0e119b
child 535 f255342d132f
     1.1 --- a/core/sm_stringutil.cpp	Fri Feb 16 04:43:48 2007 +0000
     1.2 +++ b/core/sm_stringutil.cpp	Fri Feb 16 07:48:38 2007 +0000
     1.3 @@ -794,3 +794,9 @@
     1.4  	return (len >= maxlength) ? (maxlength - 1) : len;
     1.5  }
     1.6  
     1.7 +char *sm_strdup(const char *str)
     1.8 +{
     1.9 +	char *ptr = new char[strlen(str)+1];
    1.10 +	strcpy(ptr, str);
    1.11 +	return ptr;
    1.12 +}