ali@94: #include ali@94: #include ali@94: #include ali@94: #include ali@94: ali@94: /* ali@94: * Creates a new string length bytes long filled with fill_char. ali@94: * The returned string should be freed when no longer needed. ali@94: */ ali@94: gchar *utf8_strnfill(gsize length,gunichar fill_char) ali@94: { ali@94: int n,i; ali@94: gchar *s; ali@94: char utf8[6]; ali@94: n=g_unichar_to_utf8(fill_char,utf8); ali@94: s=g_new(gchar,length*n+1); ali@94: if (n==1) ali@94: memset(s,utf8[0],length); ali@94: else ali@94: for(i=0;i