public static String capitalise(String s) {
        String finalString = "";
        if (s.contains(" ")) {
            StringBuilder builder = new StringBuilder();
            String[] sp = s.split(" ");
            for (String string : sp) {
                string = string.substring(0, 1).toUpperCase() + string.substring(1).toLowerCase();
                builder.append(string);
                builder.append(" ");
            }
            builder.deleteCharAt(builder.length() - 1);
            finalString = builder.toString();
        } else {
            finalString = s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase();
        }
        return finalString;
    }