Here you can find the source of splitByCamelCase(String name)
public static String[] splitByCamelCase(String name)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static String[] splitByCamelCase(String name) { List<String> parts = new ArrayList<String>(); StringBuilder b = new StringBuilder(); for (int i = 0; i < name.length(); i++) { if (i > 0 && Character.isUpperCase(name.charAt(i))) { parts.add(b.toString()); b = new StringBuilder(); }/*from w w w . j av a 2 s. c o m*/ b.append(Character.toLowerCase(name.charAt(i))); } parts.add(b.toString()); return parts.toArray(new String[] {}); } }