Back to index

extremetuxracer  0.5beta
Functions
string_util.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * string_copy (const char *src)

Function Documentation

char* string_copy ( const char *  src)

Definition at line 28 of file string_util.cpp.

{
    char *dest;

    check_assertion( src != NULL, "string NULL in string_copy" );

    dest = (char *) malloc( sizeof(char) * ( strlen( src ) + 1 ) );

    if ( dest == NULL ) {
       handle_system_error( 1, "malloc failed" );
    }

    strcpy( dest, src );
    return dest;
}

Here is the call graph for this function:

Here is the caller graph for this function: