|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: please help
indeed off topic but
The following will return "off-topic post".
trim(" off-topic post ")
function ltrim(argvalue) {
while (1) {
if (argvalue.substring(0, 1) != " ")
break;
argvalue = argvalue.substring(1, argvalue.length);
}
return argvalue;
}
function rtrim(argvalue) {
while (1) {
if (argvalue.substring(argvalue.length - 1, argvalue.length) != " ")
break;
argvalue = argvalue.substring(0, argvalue.length - 1);
}
return argvalue;
}
function trim(argvalue)
{
var tmpstr = ltrim(argvalue);
return rtrim(tmpstr);
}
of course you can combine them in one function.....
Good Luck
BrianM
<quote>
I think this question is out of the list but if anyone could help
i need a javascript function which removes trailing spaces from a string.
one more thing if any one of u is aware of a javascripts mailing list
thanks in advance
abdul
</quote>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








