evkaky
07/24/2017, 8:05 AMThere is no such thing as a EOF characterreally sadly
voddan
07/24/2017, 8:06 AMevkaky
07/24/2017, 8:15 AMdef advance(self):
self.pos += 1
if self.pos > len(self.text) - 1:
self.current_char = None # Indicates end of input
else:
self.current_char = self.text[self.pos]
if self.current_char is not None ...
and I’m trying to code something like that but in kotlin. I need some special char value (python programmers have None for that case).
May be nullable Char?voddan
07/24/2017, 9:46 AMReader.read()
returns -1
when the end of file is reached. See https://stackoverflow.com/questions/811851/how-do-i-read-input-character-by-character-in-javavoddan
07/24/2017, 9:47 AM