Manipulating a string in javascript
<p>If I have a long string, lets say</p>

<pre><code>var str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean eu accumsan urna. Phasellus imperdiet elementum massa sit amet condimentum. Vivamus porttitor lobortis dignissim. Nam non tellus sapien, at pulvinar augue. Nulla metus mauris, cursus a sodales varius, imperdiet nec nisi. Quisque ut est quis massa sagittis pharetra quis aliquam dui. Phasellus id nisi quis mauris ultricies tristique et ut orci.";
</code></pre>

<p>and I want to manipulate it to display it something like this</p>

<pre><code>"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean eu..."
</code></pre>

<p>How can I do that?</p>
