MCPcopy Create free account
hub / github.com/GNOME/gjs / gjs_hyphen_to_underscore

Function gjs_hyphen_to_underscore

gjs/jsapi-util-string.cpp:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42class JSLinearString;
43
44Gjs::AutoChar gjs_hyphen_to_underscore(const char* str) {
45 char* s = g_strdup(str);
46 char* retval = s;
47 while (*(s++) != '\0') {
48 if (*s == '-')
49 *s = '_';
50 }
51 return retval;
52}
53
54Gjs::AutoChar gjs_hyphen_to_camel(const char* str) {
55 Gjs::AutoChar retval{static_cast<char*>(g_malloc(strlen(str) + 1))};

Callers 3

jsobj_set_gpropertyFunction · 0.85
gjs_object_get_gpropertyFunction · 0.85
new_enumerate_implMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected