STL: lexicographical_compare

lexicographical_compare

Compares element by element between two sequences to determine which is lesser of the two.(以字典排列方式进行比较)

template<class InputIterator1, class InputIterator2>
   bool lexicographical_compare(
      InputIterator1 _First1,
      InputIterator1 _Last1,
      InputIterator2 _First2,
      InputIterator2 _Last2
   );
template<class InputIterator1, class InputIterator2, class BinaryPredicate>
   bool lexicographical_compare(
      InputIterator1 _First1,
      InputIterator1 _Last1, 
      InputIterator2 _First2, 
      InputIterator2 _Last2,
      BinaryPredicate _Comp
   );
Return Value

true if the first range is lexicographically less than the second range; otherwise false.

 

posted @ 2013-03-07 11:07  freewater  阅读(268)  评论(0编辑  收藏  举报