Java examples for java.lang:String Substring
get Substring After
//package com.java2s; public class Main { public static void main(String[] argv) { String s = "java2s.com"; char c = 'o'; System.out.println(getSubstringAfter(s, c)); }/* ww w. java2 s .c o m*/ public static String getSubstringAfter(String s, char c) { return s.substring(s.lastIndexOf(c) + 1).trim(); } }