Am I missing something I make a series of lines of text in notepad pressing enter after each line. Reading them into Monkey I get ALL the lines in one string.
Surely ReadString, ReadCString and ReadSizedString shouldn’t read past #10 or #13?
I’m wondering if I missed something when reading strings from a stream?
Not sure what is your problem here but you can have a lot CR or LF or CRLF in a single string.
Do you mean the string does not contain any ~n(LF #10) or ~r(CR #13) any more? i.e. when you print it, the line return are not there anymore? Do you mean “into Monkey I get ALL then lines in one line“?
When I load a string with LoadString I then have to split it in lines to process it with some line per line logic.
Monkey
1
2
3
4
5
6
7
8
9
10
11
LocalbigString:=LoadString("mytext.txt",true)'true to convert eol to LF only
IfbigString<>Null
ForLocalline:=EachinbigString.Split("~n")
Next
Endif
or
lines:=bigString.Split("~n")' this create an array with all the lines without the LF ate the end
ah I see I thought it was like MX1 and max etc where it read a line of characters and stopped at the end of line character. Thanks for the parsing code you put up and he information on it
The #13’s are there but previous versions stopped at that point which is why I wondered if something was amiss.