Sign in Join
FPDoc Onlineexperiment

StringToGUID function

In unit sysutils

Convert a string to a native TGUID type.

Declaration

pascal
function StringToGUID(const S: string): TGUID

Description

StringToGUID converts the string S to a valid GUID. The string S should be of the form

{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}

Where each X is a hexadecimal digit. The dashes and braces are required.

Errors

In case S contains an invalid GUID representation, a EConvertError exception is raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.