format

fun format(value: String): String(source)

Formats a CIN to canonical form: 21-character uppercase, no separators.

Applies the same normalisation as validate before formatting. MCA publishes CINs without display separators — output is the raw uppercase string: e.g. "U72200KA2013PTC097389".

This method is idempotent: format(format(x)) == format(x).

Return

Canonical 21-character uppercase CIN string.

Parameters

value

Raw CIN string.

Throws

if value is not a valid CIN. The exception message includes the (truncated) input for diagnostics.

Samples

check(CIN.format("l17110mh1973plc019786") == "L17110MH1973PLC019786")