@@ -37,11 +37,11 @@ } of_string_encoding_t; #ifdef __cplusplus extern "C" { #endif -extern int of_string_check_utf8(const char*, size_t); +extern int of_string_check_utf8(const char*, size_t, size_t*); extern size_t of_string_unicode_to_utf8(of_unichar_t, char*); extern size_t of_string_utf8_to_unicode(const char*, size_t, of_unichar_t*); extern size_t of_string_position_to_index(const char*, size_t); extern size_t of_string_index_to_position(const char*, size_t, size_t); extern size_t of_unicode_string_length(const of_unichar_t*); @@ -76,10 +76,11 @@ */ struct of_string_ivars { char *cString; size_t cStringLength; BOOL isUTF8; + size_t length; } *restrict s; /* * Unused in OFString, however, OFConstantString sets this to SIZE_MAX * once it allocated and initialized the struct. */