2 //=============================================================================
3 // File : duplicate.cxx
4 // Created : lun nov 5 16:04:47 CET 2001
5 // Author : Antoine YESSAYAN, EDF
7 // Copyright : EDF 2001
9 //=============================================================================
12 * This function can be changed by strdup() if strdup() is ANSI.
13 * It is strongly (and only) used in the Registry environment
14 * (RegistryService, RegistryConnexion, Identity, ...)
21 #include "utilities.h"
23 const char* duplicate( const char *const str )
26 const size_t length = strlen( str ) ;
28 char *new_str = new char[ 1+length ] ;
30 strcpy( new_str , str ) ;