diff options
Diffstat (limited to 'src/mir_core/utils.cpp')
-rw-r--r-- | src/mir_core/utils.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mir_core/utils.cpp b/src/mir_core/utils.cpp index 4ebba2f293..12aad9d8a9 100644 --- a/src/mir_core/utils.cpp +++ b/src/mir_core/utils.cpp @@ -23,6 +23,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
+MIR_CORE_DLL(char*) replaceStr( char* &dest, const char *src )
+{
+ if ( dest != NULL )
+ mir_free( dest );
+
+ return dest = ( src != NULL ) ? mir_strdup( src ) : NULL;
+}
+
+MIR_CORE_DLL(WCHAR*) replaceStrW( WCHAR* &dest, const WCHAR *src )
+{
+ if ( dest != NULL )
+ mir_free( dest );
+
+ return dest = ( src != NULL ) ? mir_wstrdup( src ) : NULL;
+}
+
MIR_CORE_DLL(char*) rtrim(char* str)
{
if (str == NULL)
|