diff --git a/src/lang/string.js b/src/lang/string.js index 6d715c1..2798bcc 100644 --- a/src/lang/string.js +++ b/src/lang/string.js @@ -407,7 +407,9 @@ Object.extend(String.prototype, (function() { sub: sub, scan: scan, truncate: truncate, - strip: strip, + // Firefox 3.5+ supports String.prototype.trim + // (`trim` is ~ 5x faster than `strip` in FF3.5) + strip: String.prototype.trim ? String.prototype.trim : strip, stripTags: stripTags, stripScripts: stripScripts, extractScripts: extractScripts,