/*
 **    Name: strdup.c
 **
 **    Date: Thu Jan 10 09:08:28 2002
 **
 */

#include <string.h>
#include <stdlib.h>
#include "csstring.h"

char *csstrdup(const char *string)
{
    char *new_string;

    int length;

    length = strlen(string) + 1;

    new_string = malloc(length);

    if (new_string != NULL)
    {
        memcpy(new_string,string,length);
    }

    return new_string;
}
