I'm trying to find all indexes of the string "\r\n" (basically line feed and return) in a large string. 

I need to do this since i have to write the large string to a PDF file line by line (i have to call the newline API of the dll i'm using after writing the preceding line).

Here is the short version of the code:-

```
    string fileContents = "abc\r\n\r\ndef\r\nghi";

    int pos = -1; 

    int start = 0;

    while ((pos = fileContents.IndexOf("\r\n", start)) != -1)
    {
        //extract string
        //write string to PDF
        //call newline API

        start = pos + 1;

    }

```

The expected positions of "\r\n" in fileContents variable are 3,7 and 14. However, on debugging the code, the values in pos variable are 3, 5 and 10.

What seems to be wrong with my indexOf() call?