Java - Write code to remove substring from Start

Requirements

Write code to remove substring from Start

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        String str = "book2s.com";
        String remove = "book2s";
        System.out.println(removeStart(str, remove));
    }/*from  www  . ja  v a  2  s  .  c o  m*/

    public static String removeStart(String str, String remove) {
        if (isEmpty(str) || isEmpty(remove)) {
            return str;
        }
        if (str.startsWith(remove)) {
            return str.substring(remove.length());
        }
        return str;
    }

    public static boolean isEmpty(String chkStr) {
        if (chkStr == null) {
            return true;
        } else {
            return "".equals(chkStr.trim()) ? true : false;
        }
    }
}

Related Exercise