in src/main/java/com/univocity/parsers/fixed/FixedWidthParser.java [265:292]
private void readValueUntilNewLine() {
if (ignoreTrailingWhitespace) {
if (alignment == FieldAlignment.RIGHT) {
while (length-- > 0 && ch != newLine) {
output.appender.appendIgnoringWhitespace(ch);
ch = input.nextChar();
}
} else {
while (length-- > 0 && ch != newLine) {
output.appender.appendIgnoringWhitespaceAndPadding(ch, padding);
ch = input.nextChar();
}
}
} else {
if (alignment == FieldAlignment.RIGHT) {
while (length-- > 0 && ch != newLine) {
output.appender.append(ch);
ch = input.nextChar();
}
} else {
while (length-- > 0 && ch != newLine) {
output.appender.appendIgnoringPadding(ch, padding);
ch = input.nextChar();
}
}
}
}