parseElementString

fun parseElementString(data: String, separator: Char = GROUP_SEPARATOR): Gs1Message(source)

Parses data as transmitted by a barcode reader, e.g. ]d20109501101020917\u001D2110.

Accepts an optional GS1 symbology identifier (]C1, ]d2, ]Q3, ]e0, ]J1) and an optional leading separator. The element order is kept.

Throws

if the data is not GS1 data or is invalid.