- Code: Select all
var sResult = "";
if (typeof(String.trim) != "function") sResult = " not";
UltraEdit.messageBox("String method trim is" + sResult + " supported.");
I had not read that thread until today. I also accidentally wrote some code with the trim() method and forgot to put in the normal prototype addition to the String object and wondered why it worked.
I guess it must be 1.8.1 as reduce()/reduceRight() from version 1.8 and trim()/trimgRight()/trimLeft()/JSON from version 1.8.1 works, and Array.isArray() new to version 1.8.5 does not work. (As of UE 18.00.0.1017).