StringUtil { public static String[] splitCamelCase( String string ) { List<String> nodes = new ArrayList<String>(); char[] chars = string.toCharArray(); StringBuilder buff = new StringBuilder(); for ( int i = 0; i < chars.length; i++ ) { char c = chars[i]; if ( Character.isUpperCase( c ) ) { nodes.add( buff.toString() ); buff.delete( 0, buff.length() ); buff.append( Character.toLowerCase( c ) ); } else { buff.append( c ); } } if ( buff.length() != 0 ) { nodes.add( buff.toString() ); } return nodes.toArray( new String[nodes.size()] ); }  static String removePrefix( String str ); static String toCamelCase( String str ); static String[] splitCamelCase( String string ); static String toUpperCamelCase( String name );  }
@Test public void testSplit() { String a = "abcCba"; assertEquals( Arrays.toString( new String[] { "abc", "cba" } ), Arrays.toString( StringUtil.splitCamelCase( a ) ) ); }