title: JavaScript to split string by end of line character and read each line
body: <p>I have a need to loop through a large string with several eol characters and read each of these lines looking for characters. I could've done the following but I feel that its not very efficient as there could be more than 5000 characters in this large string.</p>
  <pre><code>var str = largeString.split(&quot;\n&quot;);
  </code></pre>
  <p>and then loop through str as an array</p>
  <p>I cant really use jquery and can only use simple JavaScript.</p>
  <p>Is there any other efficient way of doing this?</p>