| 797 | } |
| 798 | |
| 799 | String String::to_camel_case() const { |
| 800 | String words = _separate_compound_words().strip_edges(); |
| 801 | String ret; |
| 802 | for (int i = 0; i < words.get_slice_count(" "); i++) { |
| 803 | String slice = words.get_slicec(' ', i); |
| 804 | if (slice.length() > 0) { |
| 805 | if (i == 0) { |
| 806 | slice[0] = _find_lower(slice[0]); |
| 807 | } else { |
| 808 | slice[0] = _find_upper(slice[0]); |
| 809 | } |
| 810 | ret += slice; |
| 811 | } |
| 812 | } |
| 813 | return ret; |
| 814 | } |
| 815 | |
| 816 | String String::to_pascal_case() const { |
| 817 | String words = _separate_compound_words().strip_edges(); |
no test coverage detected