Parses the string @str and verify if it is a UUID.
Generates a random UUID (RFC 4122 version 4) as a string.
See Implementation