@Test public void splitCamelCase() { assertCamelCaseSplit("firstName", "first", "Name"); assertCamelCaseSplit("fooBar", "foo", "Bar"); assertCamelCaseSplit("fooBar", "foo", "Bar"); assertCamelCaseSplit("fBar", "f", "Bar"); assertCamelCaseSplit("FBar", "F", "Bar"); assertCamelCaseSplit("MYCdi", "MY", "Cdi"); assertCamelCaseSplit("MyCDIUI", "My", "CDIUI"); assertCamelCaseSplit("MyCDIUITwo", "My", "CDIUI", "Two"); assertCamelCaseSplit("first name", "first", "name"); }
public static String[] splitCamelCase(String camelCaseString) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < camelCaseString.length(); i++) { char c = camelCaseString.charAt(i); if (Character.isUpperCase(c) && isWordComplete(camelCaseString, i)) { sb.append(' '); } sb.append(c); } return sb.toString().split(" "); }
SharedUtil implements Serializable { public static String[] splitCamelCase(String camelCaseString) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < camelCaseString.length(); i++) { char c = camelCaseString.charAt(i); if (Character.isUpperCase(c) && isWordComplete(camelCaseString, i)) { sb.append(' '); } sb.append(c); } return sb.toString().split(" "); } }
SharedUtil implements Serializable { public static String[] splitCamelCase(String camelCaseString) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < camelCaseString.length(); i++) { char c = camelCaseString.charAt(i); if (Character.isUpperCase(c) && isWordComplete(camelCaseString, i)) { sb.append(' '); } sb.append(c); } return sb.toString().split(" "); }  }
SharedUtil implements Serializable { public static String[] splitCamelCase(String camelCaseString) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < camelCaseString.length(); i++) { char c = camelCaseString.charAt(i); if (Character.isUpperCase(c) && isWordComplete(camelCaseString, i)) { sb.append(' '); } sb.append(c); } return sb.toString().split(" "); }  static boolean equals(Object o1, Object o2); static String trimTrailingSlashes(String value); static String[] splitCamelCase(String camelCaseString); static String camelCaseToHumanFriendly(String camelCaseString); static String join(String[] parts, String separator); static String capitalize(String string); static String propertyIdToHumanFriendly(Object propertyId); static String addGetParameters(String uri, String extraParams); static String dashSeparatedToCamelCase(String dashSeparated); }
SharedUtil implements Serializable { public static String[] splitCamelCase(String camelCaseString) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < camelCaseString.length(); i++) { char c = camelCaseString.charAt(i); if (Character.isUpperCase(c) && isWordComplete(camelCaseString, i)) { sb.append(' '); } sb.append(c); } return sb.toString().split(" "); }  static boolean equals(Object o1, Object o2); static String trimTrailingSlashes(String value); static String[] splitCamelCase(String camelCaseString); static String camelCaseToHumanFriendly(String camelCaseString); static String join(String[] parts, String separator); static String capitalize(String string); static String propertyIdToHumanFriendly(Object propertyId); static String addGetParameters(String uri, String extraParams); static String dashSeparatedToCamelCase(String dashSeparated); static final String SIZE_PATTERN; }