strdup

Duplicates a string. If str is NULL it returns NULL.

string
strdup
(
string str = null
)

Parameters

str string

the string to duplicate

Return Value

Type: string

a newly-allocated copy of str