title: Convert string to Pascal Case (aka UpperCamelCase) in Javascript
body: <p>Id like to know how I can covert a string into a pascal case string in javascript (&amp; most probally regex).</p>
  
  <p>Conversion Examples:</p>
  
  <ul>
  <li>double-barrel = Double-Barrel</li>
  <li>DOUBLE-BARREL = Double-Barrel</li>
  <li>DoUbLE-BaRRel = Double-Barrel</li>
  <li>double barrel = Double Barrel</li>
  </ul>
  
  <p>Check <a href="http://c2.com/cgi/wiki?PascalCase" rel="noreferrer">this link</a> for further info on Pascal Case</p>