cast special characters to latin alphabet characters only

56 views Asked by At

I have to implement a function, which receives an std::string and returns an std::string only consisting of the letters a-z:

std::string Convert(const std:string& strWithSpecialChars);

For example this test should pass:

"kilicdaroglu" == Convert("Kılıçdaroğlu");

I am not exactly sure if my Point of view is correct, e.g. that ğ can be considered as a special form for g. I have to support not only turkish letters, but also French letters including accent or German special letters such as ÄÖÜäöü.

Background is a validation for the German social security number which includes the first letter of the family name - only a-z and I want to validate vs the family name.

0

There are 0 answers