Created
November 27, 2017 13:46
-
-
Save seogi1004/f3d7f994e0d39c70cbe13e210ca7343f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.trim = function() { | |
return (this.replace(/^[\s\xA0]+/, "").replace(/[\s\xA0]+$/, "")); | |
}; | |
var sObj = new String(" Prototype Test "); | |
sTxt = sObj.trim(); | |
alert("--" + sTxt + "--"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment