Remove leading, trailing space and leading zeros from string
Hi guys,
I'm using 'parseInt' function to
// Removes all leading and trailing white-space characters from the string and then
// Removes all leading occurrences of the specified character 0 (zeros)
var invoiceId = parseInt(document.getElementById("txtId").value) || "";
Now I thinking another situation:
How to remove leading trailing white-space and leading zeros only. Other numbers, alphabetic characters and any possible characters to leave as it is.
var src = ' 001abc!"$%^&*()_+234 ';// result: '1abc!"$%^&*()_+234