Function UuidFromChar() Foundation

Convert a UUID to its binary representation

Syntax
UuidFromChar( <cUUID> ) --> xUUID
Parameters
<cUUID>
<cUUID> is a character string with the length 36. It follows the notation xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx whereby every 'x' is a placeholder for a digit from '1' to '9' or a letter from 'a' to 'f' or 'A' to 'F'.
Return

The return value is a binary character string which can include any character from Chr(0) to Chr(255).

Description

With the function UuidFromChar() a Universally Unique IDentifier can be transformed from its readable to its binary representation. This function is the inverse function of UuidToChar() .

Examples
UuidFromChar()
// Create a uuid and convert it to its human readable 
// representation. Then retransform to its binary 
// representation and compare it with the original value 

PROCEDURE Main 
   LOCAL xUUID, cUUID 

   xUUID := UuidCreate() 
   cUUID := UuidToChar( xUUID ) 
   ? xUUID == UuidFromChar( cUUID )  // result: .T. 

   WAIT 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.