forked from organicmaps/organicmaps
[search] Simplify apostrophe.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
parent
3d2b9982d4
commit
2d0a756170
2 changed files with 9 additions and 0 deletions
|
@ -282,4 +282,9 @@ UNIT_TEST(NormalizeAndSimplifyString_Numero)
|
|||
TEST_EQUAL(NormalizeAndSimplifyStringUtf8("Area #One"), "area #one", ());
|
||||
}
|
||||
|
||||
UNIT_TEST(NormalizeAndSimplifyString_Apostrophe)
|
||||
{
|
||||
TEST_EQUAL(NormalizeAndSimplifyStringUtf8("Pop’s"), "pop's", ());
|
||||
}
|
||||
|
||||
} // namespace search_string_utils_test
|
||||
|
|
|
@ -130,6 +130,10 @@ UniString NormalizeAndSimplifyString(std::string_view s)
|
|||
c = 'a';
|
||||
uniString.insert(uniString.begin() + (i++) + 1, 'e');
|
||||
break;
|
||||
case 0x2018: // ‘
|
||||
case 0x2019: // ’
|
||||
c = '\'';
|
||||
break;
|
||||
case 0x2116: // №
|
||||
c = '#';
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue