Created
November 27, 2017 13:47
-
-
Save seogi1004/ce37c4ac1fd821e5a6142ed2eb2ef2aa 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
var sObj = new String(" Prototype Test "); | |
sObj.trim = function() { | |
return (this.replace(/^[\s\xA0]+/, "").replace(/[\s\xA0]+$/, "")); | |
}; | |
sTxt = sObj.trim(); | |
alert("--" + sTxt + "--"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment