ilopez / GS1Parser

A GS1 Parser for C#
MIT License
28 stars 11 forks source link

Excluding fnc1 seperator #1

Open pietklop opened 7 years ago

pietklop commented 7 years ago

Very useful code but i should exclude the fnc1 seperator character from the ai result.

I changed it like this: (added fnc1Correction)

            int fnc1Correction = 0;
            if (indexOfGroupTermination >= 0)
            {
                lenghtToRead = indexOfGroupTermination + 1;
                fnc1Correction = 1;
            }
            // get the data of the current AI till the group seperator
            result = data.Substring(index, lenghtToRead - fnc1Correction);
Lars-Roeser commented 1 year ago

Thanks, perfekt solution!