how to trim leading spaces in html using css

69

var str = '/var/www/site/Brand new document.docx';

document.write( str.replace(/\s/g, '') );
<div style="white-space:pre-wrap"> <!-- New Line -->
   <!-- 2 space --> This is my text
</div>

Comments

Submit
0 Comments