Java packages usually follow format of usuing reverse domain names e.g. developers working for a company www.google.com would put their classes in a package com.google.www.engine etc.... I am wondering if anybody has some code or knows of a library (I took a look at Apache commons but didnt find anything there) in where I might get some code that reverses the the host value of a URI so that it could be used as the name of a package.
Im sure its very simple to write but if its exists already that would be preferable.
not sure if there is one. But yeah as you said , you might want to write one and get done with it. May be its wierd and misplaced here but I cant even seem to recollect how to do this in java whereas it comes to me so naturally and spontaneously in python.
'.'.join(theUrl.split('.').reverse())
Java 1.5 tiger...yea great! ..but sometimes a pain
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad:
Gift giving made easy with the permaculture playing cards