webCOMAND

uuid::any_to_string()

Return a string UUID from a binary, hex string or string format UUID.

Prototype

string any_to_string(string $uuid)

Parameters

  • uuid - A string containing valid UUID in binary, hex or string (with dashes) format.

Example

// Convert binary UUID to string format
$repo = \comand:repo();
$root = $repo->get_root();
$uuid = \io_comand_util\uuid::any_to_string($root->UUID);

// Convert hex string UUID to string format
$uuid = '1fbd75378c5411e789afc9df057a5439';
$uuid = \io_comand_util\uuid::any_to_string($uuid);