Returns a version of the same string that has spaced inserted before each capital letter @param in the CamelCase string @return the spaced Camel Case string
(String in)
| 775 | * @return the spaced Camel Case string |
| 776 | */ |
| 777 | private static String spaceCamelCase(String in) |
| 778 | { |
| 779 | StringBuilder sb = new StringBuilder(in.length()+5); |
| 780 | for(int i = 0; i < in.length(); i++) |
| 781 | { |
| 782 | char c = in.charAt(i); |
| 783 | if(Character.isUpperCase(c)) |
| 784 | sb.append(' '); |
| 785 | sb.append(c); |
| 786 | } |
| 787 | return sb.toString().trim(); |
| 788 | } |
| 789 | } |
no test coverage detected