API Reference › Uuid › Uuid.to_text
method

Uuid.to_text

Uuid.to_text(id) -> string

Returns the canonical 36-character text form of id. Because this library already represents every UUID as its canonical lowercase text, to_text is the identity function — it exists so intent is explicit at the point where a UUID is turned into a string for display, storage, or a wire payload, and so code stays correct if the internal representation ever changes to a packed 128-bit value.

Parameters

idthe UUID to render

Example

program ToText {
  entry {
    let id = Uuid.new()
    print(len(Uuid.to_text(id)))   # 36
  }
}
← All symbols