| 814 | } |
| 815 | |
| 816 | String String::to_pascal_case() const { |
| 817 | String words = _separate_compound_words().strip_edges(); |
| 818 | String ret; |
| 819 | for (int i = 0; i < words.get_slice_count(" "); i++) { |
| 820 | String slice = words.get_slicec(' ', i); |
| 821 | if (slice.length() > 0) { |
| 822 | slice[0] = _find_upper(slice[0]); |
| 823 | ret += slice; |
| 824 | } |
| 825 | } |
| 826 | return ret; |
| 827 | } |
| 828 | |
| 829 | String String::to_snake_case() const { |
| 830 | return _separate_compound_words().replace_char(' ', '_'); |
no test coverage detected