asNullIfEmpty

Checks if a string is empty, and returns a null

pure nothrow @safe
string
asNullIfEmpty
(
string str
)

Parameters

str string

The target string

Return Value

Type: string

null if the string is empty, else it returns the string

Meta