class Main {
// Java has no removePrefix; compose it yourself
static String removePrefix(String s, String prefix) {
return s.startsWith(prefix) ? s.substring(prefix.length()) : s;
}
public static void main(String[] args) {
System.out.println(removePrefix("unhappy", "un"));
// stripLeading trims whitespace, not arbitrary text
System.out.println(" padded".stripLeading());
}
}startsWith plus substring