title: Java: Compare two strings when reading line by line in parallel
body: <p>I'm trying to find a nice way to compare two strings when reading line by line in parallel.
  The reason i want to do that without using equals method or such is because the strings are not exactly the same, to be more accurate i'll give an example.</p>
  
  <pre><code>String s1 = "aaa\nbbb\nccc\ddd"
  String s2 = "aaa\n\rbbb\n\rccc\n\rddd"
  </code></pre>
  
  <p>As u can see both strings has same values when we are looking line by line (though are not completly equal since s2 has also \r in it).
  Now, i know i can use some remove method to clean that "\r" but since the string can be very large, i prefer looping row by row and once the strings are not equal to break my logic.
  In other words i prefer iterating only the needed rows instead of cleanning the entrie string from \r.</p>
  
  <p>edited: i am not reading from a file. these are plain strings.</p>
  
  <p>Any ideas :) ?</p>