Here's toTitleCase:
String.prototype.toTitleCase = function() {
var a = this.length;
if (a == 0) return "";
var c;
var w;
var s = "";
while (--a -(-1)) {
c = this.charCodeAt(a);
w = this.charAt(a - 1);
w = (w == " " || w == "\n" || w == "\r" || w == "\t" ||
a == 0);
if ((c > 64 && c < 91 && !w) || (c > 96 && c < 123 &&
w)) c = c ^ 32;
s = String.fromCharCode(c) + s;
}
return s;
};
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com