DEV Community

Discussion on: Daily Challenge #188 - Break camelCase

Collapse
mategreen profile image
matej

Java Streams

public String ccbreaker(String input) {
    return Arrays.stream(input.split(""))
            .map(s -> s.matches("[A-Z]") ? " " + s.toLowerCase() : s)
            .collect(Collectors.joining());
}