WT-Fakawi
2006-09-30 18:38:02
how do I check newline in a string?
The loop below reads a character off a file, inserts it into string line. It needs to stop upon character reaching newline (keycode 13)
Never done that before. Its prolly very simple, only I dont know how, and I dont want to look it up….
I am using it for a autoer-to-autoer private chat routine.
The loop below reads a character off a file, inserts it into string line. It needs to stop upon character reaching newline (keycode 13)
file:=OpenFile('C:/test.txt',False);
repeat
ReadFileString(file,character,1);
count:=count+1;
insert(character,line,count);
writeln(regel);
until(character= ''); // <- CHECK UNTIL NEWLINE
Never done that before. Its prolly very simple, only I dont know how, and I dont want to look it up….
I am using it for a autoer-to-autoer private chat routine.