MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / camel_convert

Function camel_convert

gtk/src/hb-backend.c:2346–2376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2344};
2345
2346static void
2347camel_convert(gchar *str)
2348{
2349 gint state = CAMEL_OTHER;
2350
2351 if (str == NULL) return;
2352 while (*str)
2353 {
2354 if (*str == '_') *str = ' ';
2355 switch (state)
2356 {
2357 case CAMEL_OTHER:
2358 {
2359 if (*str >= 'A' && *str <= 'Z')
2360 state = CAMEL_FIRST_UPPER;
2361 else
2362 state = CAMEL_OTHER;
2363
2364 } break;
2365 case CAMEL_FIRST_UPPER:
2366 default:
2367 {
2368 if (*str >= 'A' && *str <= 'Z')
2369 *str = *str - 'A' + 'a';
2370 else
2371 state = CAMEL_OTHER;
2372 } break;
2373 }
2374 str++;
2375 }
2376}
2377
2378static gchar*
2379get_file_label(const gchar *filename)

Callers 1

ghb_create_volume_labelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected