List of usage examples for java.lang String lastIndexOf
public int lastIndexOf(String str)
From source file:com.sangupta.shire.util.ShireUtils.java
/** * Method that creates a unique ID for this post. * For now, we remove the last extension *///w w w . j a v a 2 s . c om public static String createUniquePageID(String url) { int index = url.lastIndexOf('.'); if (index != -1) { return url.substring(0, index); } return url; }