34 static const char oName[] =
"Arabic Vowel Points";
35 static const char oTip[] =
"Toggles Arabic Vowel Points";
39 static const StringList oVals(&choices[0], &choices[2]);
44 static char *
nextMark(
const char* from,
int* mark_size) {
87 unsigned char* byte = (
unsigned char*) from;
88 for (; *byte; ++byte) {
89 if (byte[0] == 0xD9) {
90 if (byte[1] >= 0x8B && byte[1] <= 0x95) {
96 if (byte[0] == 0xEF) {
97 if (byte[1] == 0xB1) {
98 if (byte[2] >= 0x9E && byte[2] <= 0xA3) {
104 if (byte[1] == 0xB9) {
105 if (byte[2] >= 0xB0 && byte[2] <= 0xBF) {
148 if (!mark_pos || !*mark_pos)
155 char* end_of_output = mark_pos;
159 const char* start_of_input = mark_pos;
166 int ready_size = (int)(mark_pos - start_of_input);
167 if (ready_size > 0) {
173 memmove(end_of_output, start_of_input, ready_size);
175 end_of_output += ready_size;
178 start_of_input = mark_pos + mark_size;
180 mark_pos =
nextMark(start_of_input, &mark_size);
182 }
while (mark_pos && *mark_pos);
185 memmove(end_of_output, start_of_input, strlen(start_of_input)+1);
#define SWORD_NAMESPACE_START
virtual ~UTF8ArabicPoints()
static char * nextMark(const char *from, int *mark_size)
static const StringList * oValues()
const char * c_str() const
std::list< SWBuf > StringList
static const char oName[]
static const char * choices[4]
#define SWORD_NAMESPACE_END
virtual char processText(SWBuf &text, const SWKey *key=0, const SWModule *module=0)