zplCore.comzplCore.com

Gs1

public static class Gs1

GS1 Application Identifier parser and linter, following BWIPP's gs1process (AI table extracted from the GS1 Syntax Dictionary as shipped in BWIPP). Accepts bracketed element strings "(01)…(10)…" and raw FNC1-separated strings (GS U+001D, "^FNC1" or a leading "]C1"/"]e0"/"]d2"/"]Q3" symbology identifier).

Try it online on zplCloud.com: GS1-128 · GS1 DataMatrix · Check barcode

Fields & Constants

FieldTypeDescription
const GS = charGroup separator used for FNC1 in raw strings.

Methods

Method SignatureReturnsDescription
static # NeedsSeparator(string ai)boolTrue when an FNC1 separator must follow this AI's value (unless it is last).
static # Parse(string s, bool lintReqs = false)Gs1ResultParses either bracketed or raw form, depending on whether it starts with '('.
static # ParseBracketed(string s, bool lintReqs = false)Gs1ResultParses "(AI)value(AI)value…" and lints it.
static # ParseRaw(string raw, bool lintReqs = false)Gs1ResultParses a raw FNC1-separated string (AIs and values concatenated) and lints it.
static # ToElementString(IEnumerable<Gs1Element> els)string"(AI)value…" form.
static # ToRaw(IReadOnlyList<Gs1Element> els, string separator = "")stringRaw form: AI+value concatenated, separator after variable-length values (not after the last).
static # Validate(IReadOnlyList<Gs1Element> els, bool lintReqs = false)List<Gs1Error>Validates values against the AI table (BWIPP gs1process lint), optionally checking requisite AIs.