asUuid

asUuid(): Binary;

The asUuid method of the String primitive type returns a binary by formatting the string as a Universally Unique Identifier (UUID).

If the string is not formatted as a valid UUID representation (that is, as returned by the Binary primitive type uuidAsString method), exception 1407 (Invalid argument passed to method) is raised.

The code fragment in the following example shows the use of the asUuid method.

vars
    str : String;
    bin : Binary;
begin
    str := "4dfc912a-b466-01d0-1027-000085823b00";
    bin := str.asUuid();

7.1.06 (Service Pack 5) and higher