Logo Search packages:      
Sourcecode: ardour version File versions  Download package

std::string Glib::ustring::casefold_collate_key (  )  const

Create a unique key for the UTF-8 string that can be used for caseless sorting. ustr.casefold_collate_key() results in the same string as ustr.casefold().collate_key(), but the former is likely more efficient.

Definition at line 1166 of file ustring.cc.

{
  char *const casefold_buf = g_utf8_casefold(string_.data(), string_.size());
  char *const key_buf      = g_utf8_collate_key(casefold_buf, -1);
  g_free(casefold_buf);
  return std::string(ScopedPtr<char>(key_buf).get());
}


Generated by  Doxygen 1.6.0   Back to index