Here you can find the source of splitByCharacterTypeCamelCase(String targetName)
private static List<String> splitByCharacterTypeCamelCase(String targetName)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { private static List<String> splitByCharacterTypeCamelCase(String targetName) { List<String> wordsList = new ArrayList<String>(); StringBuilder word = new StringBuilder(); for (int i = 0; i < targetName.length(); i++) { char c = targetName.charAt(i); if (Character.isUpperCase(c) && i > 0) { wordsList.add(word.toString()); word.delete(0, word.length()); word.append(Character.toLowerCase(c)); } else { word.append(Character.toLowerCase(c)); }//from w ww . ja v a 2s . c om } wordsList.add(word.toString()); return wordsList; } }