Unwanted spaces to remove in string in js
by Prabakaran[ Edit ] 2012-07-30 17:01:30
<script type="text/javascript">
String.prototype.trim = function() {
return this.replace(/^s+|s+$/g, "");
};
var s=" Hiox India ";alert(s.length)
var str=s.trim();
alert(str.length);
</script>