Guid.normalize Function

Normalize a Guid string if possible. Normalization consists of:

  • Convert all characters to lower case
  • Trim any leading or trailing whitespace
  • Convert to the standard Guid format "8-4-4-4-12", repositioning the '-' characters as necessary, presuming there are exactly 32 hexadecimal digits.

normalize(value: string): GuidString

Parameter Type Description
value string Input value that represents a Guid

Returns - GuidString

Normalized representation of the Guid string. If the normalization fails, return the original value unmodified (Note: it is not a valid Guid)

Defined in

Last Updated: 11 June, 2024