Adding http://www to url
<p>How can I add <code>http://www</code> to url in an elegant way? I could do a few if statements, but I prefer something neat.</p>

<p>The idea is to create a function addHttpWWW that returns the following, for the inputs below:</p>

<pre><code>google.com =&gt; http://www.google.com
http://www.google.com =&gt; http://www.google.com
www.google.com =&gt; http://www.google.com
http://google.com =&gt; http://www.google.com
</code></pre>
