20 #ifndef TESSERACT_CCUTIL_UNICHAR_H_ 21 #define TESSERACT_CCUTIL_UNICHAR_H_ 31 #define UNICHAR_LEN 30 38 static const int INVALID_UNICHAR_ID = -1;
40 static const char INVALID_UNICHAR[] =
"__INVALID_UNICHAR__";
92 static int utf8_step(
const char* utf8_str);
140 return lhs.it_ == rhs.it_;
143 return !(lhs == rhs);
161 static std::vector<char32>
UTF8ToUTF32(
const char* utf8_str);
164 static string UTF32ToUTF8(
const std::vector<char32>& str32);
175 #endif // TESSERACT_CCUTIL_UNICHAR_H_ const_iterator & operator++()
static const_iterator begin(const char *utf8_str, const int byte_length)
friend bool operator==(const CI &lhs, const CI &rhs)
static std::vector< char32 > UTF8ToUTF32(const char *utf8_str)
static string UTF32ToUTF8(const std::vector< char32 > &str32)
static const_iterator end(const char *utf8_str, const int byte_length)
int get_utf8(char *buf) const
const char * utf8() const
static int utf8_step(const char *utf8_str)
const char * utf8_data() const
friend bool operator!=(const CI &lhs, const CI &rhs)