Sign in Join
FPDoc Onlineexperiment

TryStringToGUID function

In unit sysutils

Try to transform a string to a GUID.

Declaration

pascal
function TryStringToGUID(const S: string; out Guid: TGUID): Boolean

Description

TryStringToGUID tries to convert the string S to a TGUID value, returned in GUID. It returns True if the conversion succeeds, and False if the string S does not contain a valid GUID notation. The string S must be 38 characters long, must start with { and end on }, and contain a valid GUID string (hex number grouped using 8-4-4-4-12 digits).

Errors

In case S does not contain a valid GUID number, False is returned.

See also

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