Skip to content

Instantly share code, notes, and snippets.

@anuvrat
Created March 4, 2012 12:43
Show Gist options
  • Select an option

  • Save anuvrat/1972842 to your computer and use it in GitHub Desktop.

Select an option

Save anuvrat/1972842 to your computer and use it in GitHub Desktop.
public String cleanUrl(String url, String locale, String asin) {
String result;
if(url != null && url.indefOf("%3F") != -1) {
result url.substring(0, url.indexOf("%3F"));
} else {
result = "www.amazon." + getAmazonDomain(locale) + "/gp/product/" + asin;
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment