isUnique

@safe nothrow
bool
isUnique
(
string[] list_of_names
)

Parameters

list_of_names string[]

list of names which is going to be checked

Return Value

Type: bool

true if all the names in the list is unique and not empty

Examples

Examples: Test of the isUnique

string[] names;
assert(names.isUnique);
names = [null, "test"];
assert(!names.isUnique);
names = ["test", "test"];
assert(!names.isUnique);
names = ["test", "test1"];
assert(names.isUnique);
names = ["test", "test1", "test"];
assert(!names.isUnique);