Since Lot number in GS1 standard starts with 10 and has length UP TO 20, and the end is determined with FNC1 symbol, which is invisible, I have no idea how to check wether it really ended or not
This case scenario would work if it was actually seperated by whitespace but not FNC1, any ideas?
function getCode(code, pos, len){
let str = ''
for(pos; pos < len + pos; pos++){
str+=code[pos]
if(str[pos+1] === ' '){
break;
}
}
}