How to remove accents and tilde in a C++ std::string

前端 未结 8 1391
半阙折子戏
半阙折子戏 2020-12-15 21:26

I have a problem with a string in C++ which has several words in Spanish. This means that I have a lot of words with accents and tildes. I want to replace them for their not

8条回答
  •  盖世英雄少女心
    2020-12-15 21:58

    You might want to check out the boost (http://www.boost.org/) library.

    It has a regexp library, which you could use. In addition it has a specific library that has some functions for string manipulation (link) including replace.

提交回复
热议问题