Ulid.parse

UlidResult parse(scope const(char)[] text) static @safe pure nothrow @nogc

Parses the canonical text form.

The text must be exactly 26 characters of the Crockford base32 alphabet 0123456789ABCDEFGHJKMNPQRSTVWXYZ; lower case is accepted. The letters I, L, O and U, hyphens and every other character are rejected, and so is a first character above 7, whose value would not fit in 128 bits.

Parameters

textthe text to parse.

Returns

the ULID, or UlidError.INVALID_LENGTH,

UlidError.INVALID_CHARACTER or UlidError.VALUE_OVERFLOW. When the text has both an invalid character and an overflowing first character, INVALID_CHARACTER is reported.