|
> > nLineLength = string.len(line) > > if string.sub(line, nLineLength-3, nLineLength) ~= "<BR>" then > > line = line .. "<BR>" > > end > > You don't need nLineLength. Try > if string.sub(line, -3) ~= "<BR>" then > And if that does not work, if string.sub(line,-4):upper() ~= "<BR>" then