mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +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;
|
||||
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++;
|
||||
second++;
|
||||
}
|
||||
}
|
||||
seq->count = count;
|
||||
}
|
||||
}
|
||||
seq->normalized = YES;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue