lexicographical_compare

The function lexicographical_compare is used to determine if a range is lexicographically less than another.

  template<class InputIterator1, class InputIterator2>
  bool lexicographical_compare
  (InputIterator1 first1, InputIterator1 last1,
  InputIterator2 first2, InputIterator2 last2);
  template<class InputIterator1, 
  class InputIterator2, class Compare>
  bool lexicographical_compare
  (InputIterator1 first1, InputIterator1 last1,
  InputIterator2 first2, InputIterator2 last2,
  Compare comp);
  
Remarks

Returns true if the first argument is less than the second and false for all other conditions.