Archive for February, 2004

Hidden String Functionality

You can do more with ColdFusion strings than you might realize by using the java.lang.String methods. Most of the functionality provided by java.lang.String is already available in some form or another as ColdFusion string functions, and of course, there’s a way to do just about anything you want with ColdFusion string functions, but there a few of nice java.lang.String methods which I really like being able to use in ColdFusion:

  • toCharArray()
  • endsWith()
  • startsWith()
  • getBytes()
  • lastIndexOf()

Just use them as though they were native (which I guess technically they are), like so:

str = "This is my string.";
myCharArray = str.toCharArray();
thisIsTrue = str.startsWith("T");
thisIsFalse = str.endsWith("!");
myByteArray = str.getBytes();
fourteen = str.lastIndexOf("i");

New Tools For MXNA

We added a couple of new tools to MXNA today. Specifically, we added OPML feeds, an MXNA webservice API, and an MXNA ActionScript 2 webservice library. (If you use NetNewsWire, it will slurp up OPML feeds, and I’m guessing other aggregators will, as well). Additionally, there will be a Central MXNA webservice API available shortly. Find out details on the new MXNA Tools page.