[jQuery] Re: $.trim(string) or string.trim()

2009-04-02 Thread James
jQuery does have a trim function: http://docs.jquery.com/Utilities/jQuery.trim Although it's not in the syntax of string.trim(). return jQuery != MooTools; On Apr 1, 5:46 pm, yifang xiaoyifang198...@gmail.com wrote: mootools support syntax like this string.trim() will jquery support such

[jQuery] Re: $.trim(string) or string.trim()

2009-04-02 Thread MorningZ
will jQuery add it in the future that doesn't really make sense, as it's a String object thing, not really a jQuery object thing and it's super easy to add with one single line String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }; bam var s = i am string with