Strings In Depth1 / 18
Up next

Case and trimming

class Main {
    public static void main(String[] args) {
        String s = "  Hello World  ";
        // strip() is Unicode-aware (trim() is ASCII-only)
        System.out.println(s.strip());
        System.out.println(s.strip().toLowerCase());
    }
}
What you're solving

strip, toLowerCase, toUpperCase