#include <ambigs.h>
Definition at line 49 of file ambigs.h.
◆ compare()
static int tesseract::UnicharIdArrayUtils::compare |
( |
const UNICHAR_ID * |
ptr1, |
|
|
const UNICHAR_ID * |
ptr2 |
|
) |
| |
|
inlinestatic |
Definition at line 55 of file ambigs.h.
55 {
56 for (;;) {
59 if (val1 != val2) {
60 if (val1 == INVALID_UNICHAR_ID) return -1;
61 if (val2 == INVALID_UNICHAR_ID) return 1;
62 if (val1 < val2) return -1;
63 return 1;
64 }
65 if (val1 == INVALID_UNICHAR_ID) return 0;
66 }
67 }
◆ copy()
Definition at line 81 of file ambigs.h.
81 {
82 int i = 0;
83 do {
84 dst[i] = src[i];
85 } while (dst[i++] != INVALID_UNICHAR_ID);
86 return i - 1;
87 }
◆ find_in()
Definition at line 71 of file ambigs.h.
72 {
73 for (int i = 0; i < uid_vec.size(); ++i)
74 if (uid_vec[i] == uid) return i;
75 return -1;
76 }
◆ print()
static void tesseract::UnicharIdArrayUtils::print |
( |
const UNICHAR_ID |
array[], |
|
|
const UNICHARSET & |
unicharset |
|
) |
| |
|
inlinestatic |
Definition at line 91 of file ambigs.h.
92 {
94 if (*ptr == INVALID_UNICHAR_ID)
tprintf(
"[Empty]");
95 while (*ptr != INVALID_UNICHAR_ID) {
97 }
99 ptr = array;
100 while (*ptr != INVALID_UNICHAR_ID)
tprintf(
"%d ", *ptr++);
102 }
DLLSYM void tprintf(const char *format,...)
const char * id_to_unichar(UNICHAR_ID id) const
The documentation for this class was generated from the following file: