Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.string.popSuffix
on popSuffix (s, chseparator='.') { <<Thursday, November 11, 1999 at 2:56:36 AM by AR <<Implemented as a kernel verb in Frontier 6.1. <<Old code <<on popSuffix (s, chseparator='.') <<10/31/97 at 12:37:03 PM by DW -- moved to string.popSuffix <<turn xxx.html into xxx <<Tue, Dec 10, 1996 at 6:07:57 AM by DW <<local (i) <<for i = sizeof (s) downto 1 <<if s [i] == chseparator <<return (string.mid (s, 1, i -1)) <<return (s) kernel (string.popsuffix)} <<bundle <<test code <<dialog.alert (popSuffix ("xyz.html"))
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.