Monday, November 08, 2010 at 12:00 AM.


on titleToFilename (title) {
		<<6/1/10; 3:31:51 PM by DW
	local (adrdata = scripting2suite.init (), fname = title, i, ch);
	for i = sizeof (fname) downto 1 {
		ch = fname [i];
		if (not string.isalpha (ch)) and (not string.isnumeric (ch)) and (ch != ' ') {
			fname = string.delete (fname, i, 1)}};
	fname = string.innerCaseName (fname);
	bundle { //limit length, 3/23/07 by DW
		local (maxlen = adrdata^.prefs.maxFileNameLength - sizeof (adrdata^.prefs.htmlFileExtension));
		if sizeof (fname) > maxlen {
			fname = string.mid (fname, 1, maxlen)}};
	return (fname)}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.