mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Normalize repeated combining characters to a single one
This commit is contained in:
parent
d18cba351c
commit
9460d6a469
1 changed files with 18 additions and 0 deletions
|
@ -190,12 +190,30 @@ static inline void GSeq_normalize(GSeq seq)
|
||||||
*second = tmp;
|
*second = tmp;
|
||||||
notdone = YES;
|
notdone = YES;
|
||||||
}
|
}
|
||||||
|
else if (*first == *second)
|
||||||
|
{
|
||||||
|
unichar *end = seq->chars + count;
|
||||||
|
|
||||||
|
while (*first == *second && second < end)
|
||||||
|
{
|
||||||
|
second++;
|
||||||
|
count--;
|
||||||
|
}
|
||||||
|
first++;
|
||||||
|
while (second < end)
|
||||||
|
{
|
||||||
|
*first++ = *second++;
|
||||||
|
}
|
||||||
|
notdone = YES;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
first++;
|
first++;
|
||||||
second++;
|
second++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
seq->count = count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
seq->normalized = YES;
|
seq->normalized = YES;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue