Posted By

noah on 06/11/07


Tagged

library trim String utilities


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

jarjar2k7
vali29
skywalker
korzhik
artificialkid


Trim trailing white space


 / Published in: JavaScript
 

Trim whitespace at the end of a line

  1. trimTrailingWhiteSpace : function ( myString ) {
  2. return myString.replace(/\s*$/, '');
  3. }

Report this snippet  

You need to login to post a comment.