Я использую строковую библиотеку tinyutf8 C ++ UTF-8 из https://github.com/DuffsDevice/tinyutf8
Я пытаюсь вызвать utf8_string::find_first_of
, передавая utf8_string в качестве первого параметра.
Это генерирует следующееошибка:
error: no matching function for call to ‘utf8_string::find_first_of(utf8_string&, int&)’
int found_pos = haystack.find_first_of(needle, at_pos);
^
In file included from Phonemizer.cpp:8:0:
tinyutf8.h:1728:12: note: candidate: utf8_string::size_type utf8_string::find_first_of(const value_type*, utf8_string::size_type) const
size_type find_first_of( const value_type* str , size_type start_codepoint = 0 ) const ;
^~~~~~~~~~~~~
tinyutf8.h:1728:12: note: no known conversion for argument 1 from ‘utf8_string’ to ‘const value_type* {aka const char32_t*}’
Как я могу получить char32_t*
от моего utf8_string
?Кроме того, какой другой механизм существует, чтобы найти utf8_string
в другом utf8_string
?
Спасибо!Шон