strdup

fun strdup(str: String? = null): String(source)

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

Return

a newly-allocated copy of @str

Parameters

str

the string to duplicate