{
struct substring out;
- if ( text == NULL )
+ if (text == NULL)
return NULL;
- if ( length == -1 )
+ if (length == -1)
length = strlen (text);
out = recode_substring_pool (to, from, ss_buffer (text, length), pool);
conv = create_iconv (to, from);
- if ( NULL == conv )
+ if (NULL == conv)
{
if (fallbackchar)
{
loc_encoding = xstrdup (locale_charset ());
- if ( 0 == strcmp (loc_encoding, c_encoding))
+ if (0 == strcmp (loc_encoding, c_encoding))
{
ok = false;
}
{
iconv_t conv = iconv_open (UTF8, enc);
- if ( conv == (iconv_t) -1)
+ if (conv == (iconv_t) -1)
return false;
iconv_close (conv);
{
return utf8_casemap (s, u8_tolower);
}
+
+char *
+utf8_to_title (const char *s)
+{
+ return utf8_casemap (s, u8_totitle);
+}
\f
bool
get_encoding_info (struct encoding_info *e, const char *name)