* cosmetics

This commit is contained in:
djcb
2013-05-15 00:05:21 +03:00
parent 0bb56e5558
commit 24fa47dbef
3 changed files with 9 additions and 7 deletions

View File

@ -748,9 +748,10 @@ mu_str_asciify_in_place (char *buf)
g_return_val_if_fail (buf, NULL);
for (c = buf; c && *c; ++c)
if (!isascii(*c))
c[0] = '.';
for (c = buf; c && *c; ++c) {
if (!isascii(*c) || *c < ' ')
*c = '.';
}
return buf;
}
@ -765,7 +766,7 @@ mu_str_utf8ify (const char *buf)
utf8 = g_strdup (buf);
if (!g_utf8_validate (buf, -1, NULL))
mu_str_asciify_in_place (utf8);
mu_str_asciify_in_place (utf8);
return utf8;
}

View File

@ -201,7 +201,7 @@ char* mu_str_escape_c_literal (const gchar* str, gboolean in_quotes)
/**
* turn a string into plain ascii by replacing each non-ascii
* character with a dot ('.'). replacement is done in-place.
* character with a dot ('.'). Replacement is done in-place.
*
* @param buf a buffer to asciify
*