adobe air stream end on line (EOF)
- by goseta
Hi to all, I need to read a file, which has an "n" number of lines, I need to know when reading the end of each line, so I can store the line in an array, ok so far I have
while(stream.position < stream.bytesAvailable)
{
char = stream.readUTFBytes(1);
if(char == "\n")
{
array.push(line);
line = "";
}
else
{
line += char;
}
}
my question is, always the end of line will be "\n"?? how can I be sure if is not an other character like \r??, there is an other character for end of line??, thanks for any help!!!