public static Comparator<String> pathComparator() {
        return (o1, o2) -> {
            final int min = Math.min(o1.length(), o2.length());
            for (int i = 0; i < min; i++) {
                final int r = ((Character) o1.charAt(i)).compareTo(o2.charAt(i));
                if (r != 0) {
                    return r;
                }
            }
            return ((Integer) o1.length()).compareTo(o2.length());
        };
    }
Separates the parts in lowerCamelCase or UpperCamelCase with spaces,
e.g. 'lower Camel Case' and 'Upper Camel Case'.
stroom-util-shared/src/main/java/stroom/util/shared/ModelStringUtil.java