//********************************************************
// The following code example is taken from the book
//  C++23 - The Complete Guide
//  by Nicolai M. Josuttis (www.josuttis.com)
//  https://www.cppstd23.com
//
// The code is licensed under a
//  Creative Commons Attribution 4.0 International License
//  https://creativecommons.org/licenses/by/4.0/
//********************************************************


#include <print>
#include <vector>
#include <list>
#include <algorithm>

int main()
{
  std::vector<int> coll{0, 8, 15, 47, 11, 8, 0};
  std::list<long> sub{0, 8};

  std::println("{} starts with {}: {}", coll, sub, 
                                        std::ranges::starts_with(coll, sub));

  std::println("{} ends with   {}: {}", coll, sub, 
                                        std::ranges::ends_with(coll, sub));
}

