19944, "ShreyasKhandekar", "I/O Module: better way to stripNewline in readLine", "2022-06-06T15:53:54Z"
In our current implementation of readLine
we intially include the newline character regardless of what is specified in the stripNewline
argument. We then use string.strip()
or byted.strip()
to strip the newline if needed.
This is not a very memory efficient way to handle strings and thus a better way is needed.
One possible implementation could be to have an additional string_format
in iostyleInternal
which could be something along the lines of QIO_STRING_FORMAT_TOEND_DROPEND
and set the end to be the newline character. This would result in the newline being read but never included in the string.