Support mapping a General Category to a General Category Group.

This commit is contained in:
Reece H. Dunn
2012-12-24 15:55:23 +00:00
parent 6e15fd6d9b
commit 349e225aae
3 changed files with 21 additions and 4 deletions
+7 -2
View File
@@ -2981,9 +2981,9 @@ ucd::category ucd::lookup_category(codepoint_t c)
return Ii; // Invalid Unicode Codepoint
}
ucd::category_group ucd::lookup_category_group(codepoint_t c)
ucd::category_group ucd::lookup_category_group(category c)
{
switch (lookup_category(c))
switch (c)
{
case Cc: case Cf: case Cn: case Co: case Cs:
return C;
@@ -3003,3 +3003,8 @@ ucd::category_group ucd::lookup_category_group(codepoint_t c)
return I;
}
}
ucd::category_group ucd::lookup_category_group(codepoint_t c)
{
return lookup_category_group(lookup_category(c));
}