adobe air stream end on line (EOF)

Posted by goseta on Stack Overflow See other posts from Stack Overflow or by goseta
Published on 2010-03-27T23:35:02Z Indexed on 2010/03/27 23:43 UTC
Read the original article Hit count: 121

Filed under:
|
|
|

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!!!

© Stack Overflow or respective owner

Related posts about as3

Related posts about actionscript-3