Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- removeAccents(const string[], dest[], len = sizeof dest)
- {
- static const ACCENTS[] = "ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž";
- static const NON_ACCENTS[] = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz";
- format(dest, len, string);
- for (new i = strlen(string); i > -1; --i)
- {
- for (new c; c < sizeof ACCENTS; ++c)
- {
- if (string[i] == ACCENTS[c])
- {
- dest[i] = NON_ACCENTS[c];
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement