hyphened

Extension function for UuidString that returns the UUID in hyphenated format.

If the string already contains hyphens, it is returned as-is. Otherwise, hyphens are inserted at the standard UUID positions (8, 13, 18, 23) to convert a plain 32-character string into the canonical UUID format (8-4-4-4-12).

Example:

val raw = "123e4567e89b12d3a456426655440000"
val hyphened = raw.hyphened() // "123e4567-e89b-12d3-a456-426655440000"