shell_util_normalize_and_casefold: New utility function
Merge the duplicated copies into shell-util.
This commit is contained in:
@ -506,6 +506,20 @@ shell_util_get_transformed_allocation (ClutterActor *actor,
|
||||
box->y2 = y_max;
|
||||
}
|
||||
|
||||
char *
|
||||
shell_util_normalize_and_casefold (const char *str)
|
||||
{
|
||||
char *normalized, *result;
|
||||
|
||||
if (str == NULL)
|
||||
return NULL;
|
||||
|
||||
normalized = g_utf8_normalize (str, -1, G_NORMALIZE_ALL);
|
||||
result = g_utf8_casefold (normalized, -1);
|
||||
g_free (normalized);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_util_format_date:
|
||||
* @format: a strftime-style string format, as parsed by
|
||||
|
Reference in New Issue
Block a user