16 Jul
2005
16 Jul
'05
6:11 p.m.
Hi Pavol,
There is no such a function in string_algo lib. But you can easily use std::lexicographical_compare.
There is a variant with a custom comparison predicate. For that you can use boost::is_iequal defined in boost/algorithm/string/compare.hpp.
According to this paper (http://lafstern.org/matt/col2_new.pdf) by Matt Austern, using lexicographical_compare (alone) is not a good idea, because it doesn't take locales into account and thus case conversion may be incorrect. He proposed a solution in this article, but since Matt Austern has already contributed to Boost, I thought this functor might already be part of the Boost libraries. -- Matthias Kaeppler