Case insensitive std::set of strings

后端 未结 4 1162
深忆病人
深忆病人 2021-01-01 12:44

How do you have a case insensitive insertion Or search of a string in std::set?

For example-

std::set s;
s.insert(\"Hello\");
s.in         


        
4条回答
  •  [愿得一人]
    2021-01-01 13:14

    std::set offers the possibility of providing your own comparer (as do most std containers). You can then perform any type of comparison you like. Full example is available here

提交回复
热议问题