A expert on system architect with full SDLC and Agile development experience.
Skills: , C# C++ Scrum OOA/OOD javascript ASP.Net MVC XML, HTML Web Service, RESTful, WCF, Android and etc.
Email me if you need help on development.
Monday, 15 August 2011
Trim leading zeros using javascript
Using simple RegExp in javacript can easily trim all leading zeros.
var numberString = ‘00220’;
var noLeadingZerosString = numberString.replace(/^0+/, ‘’); // noLeadingZerosString = ‘220’;
No comments:
Post a Comment