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

bool Glib::ustring::validate ( ustring::const_iterator first_invalid  )  const

Check whether the string is valid UTF-8.

Definition at line 1111 of file ustring.cc.

{
  const char *const pdata = string_.data();
  const char* valid_end = pdata;
  const int is_valid = g_utf8_validate(pdata, string_.size(), &valid_end);

  first_invalid = const_iterator(string_.begin() + (valid_end - pdata));
  return (is_valid != 0);
}


Generated by  Doxygen 1.6.0   Back to index