MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / to_pascal_case

Method to_pascal_case

core/string/ustring.cpp:816–827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814}
815
816String 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
829String String::to_snake_case() const {
830 return _separate_compound_words().replace_char(' ', '_');

Callers 14

adjust_name_casingMethod · 0.80
make_templateMethod · 0.80
_postprocessMethod · 0.80
_create_windowMethod · 0.80

Calls 5

_find_upperFunction · 0.85
strip_edgesMethod · 0.80
get_slice_countMethod · 0.80
get_slicecMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected