Changed unsigned int -> size_t.
Factored out some common code from validName() and wildCardName().