Function: findSegment()
findSegment(
segments,code):TelecomSegment|undefined
Find the first segment with a given identification code.
Parameters
segments
readonly TelecomSegment[]
The decoded segments.
code
string
The 2-character Segment Identification code, e.g. "07".
Returns
TelecomSegment | undefined
The first matching segment, or undefined.
Example
findSegment(t.segments, "07")?.name; // "Claim"