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

system.verbs.builtins.tcp.im.builtinDrivers.jabber.code.parseJabberId

on parseJabberId (jabberId) {
	<<Changes
		<<5/14/02; 1:51:34 PM by JB
			<<Changelog created.
	local ( l = {} );
	if not jabberId contains "@" {
		scriptError ("Can't parse Jabber ID because Jabber ID \"" + jabberID + "\" is invalid; it does not have an \"@\".")};
	l = l + string.mid(jabberId, 1, string.patternMatch("@", jabberId) - 1 );
	if jabberId contains "/" {
		l = l + string.mid(jabberId, string.patternMatch("@", jabberId) + 1, string.patternMatch("/", jabberId) - string.patternMatch("@", jabberId ) - 1 );
		l = l + string.mid(jabberId, string.patternMatch("/", jabberId) + 1, infinity );
		return l}
	else {
		l = l + string.mid(jabberId, string.patternMatch("@", jabberId) + 1, infinity );
		l = l + {""};
		return l}}



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.