17#ifndef TESSERACT_CCUTIL_UNICHAR_H_
18#define TESSERACT_CCUTIL_UNICHAR_H_
37static const int INVALID_UNICHAR_ID = -1;
39static const char INVALID_UNICHAR[] =
"__INVALID_UNICHAR__";
64 UNICHAR(
const char *utf8_str,
int len);
72 int first_uni()
const;
86 char *utf8_str()
const;
89 static int utf8_step(
const char *utf8_str);
125 int get_utf8(
char *buf)
const;
128 int utf8_len()
const;
130 bool is_legal()
const;
139 return lhs.it_ == rhs.it_;
142 return !(lhs == rhs);
155 static const_iterator begin(
const char *utf8_str,
int byte_length);
156 static const_iterator end(
const char *utf8_str,
int byte_length);
160 static std::vector<char32> UTF8ToUTF32(
const char *utf8_str);
163 static std::string UTF32ToUTF8(
const std::vector<char32> &str32);
int32_t operator*(const ICOORD &op1, const ICOORD &op2)
const char * utf8() const
const char * utf8_data() const
friend bool operator!=(const CI &lhs, const CI &rhs)
friend bool operator==(const CI &lhs, const CI &rhs)