/ Published in: JavaScript

Trim whitespace at the end of a line
Expand |
Embed | Plain Text
trimTrailingWhiteSpace : function ( myString ) { return myString.replace(/\s*$/, ''); }
You need to login to post a comment.
noah on 06/11/07
5 people have marked this snippet as a favorite
jarjar2k7
vali29
skywalker
korzhik
artificialkid
Trim whitespace at the end of a line
trimTrailingWhiteSpace : function ( myString ) { return myString.replace(/\s*$/, ''); }
You need to login to post a comment.