API Reference › Uuid › Uuid.equals
method

Uuid.equals

Uuid.equals(a, b) -> bool

Compares two UUIDs for equality, ignoring case. UUIDs generated by this library are always lowercase, so a plain == works between them — but a UUID that arrived from another system may be upper- or mixed-case, and equals matches it correctly without you having to normalise first. Values of different length are never equal.

Example

program Eq {
  entry {
    let lo = "550e8400-e29b-41d4-a716-446655440000"
    let up = "550E8400-E29B-41D4-A716-446655440000"
    if Uuid.equals(lo, up) { print(1) }   # case-insensitive
  }
}
← All symbols