(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_search&action=edit)  
[ ranges::search  ](/w/cpp/algorithm/ranges/search "cpp/algorithm/ranges/search") (C++20)  |  searches for a range of elements   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_search&action=edit)  
[ search_n  ](/w/cpp/algorithm/search_n "cpp/algorithm/search n") |  searches a range for a number of consecutive copies of an element   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_search_n&action=edit)  
[ ranges::search_n  ](/w/cpp/algorithm/ranges/search_n "cpp/algorithm/ranges/search n") (C++20)  |  searches for a number consecutive copies of an element in a range   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_search_n&action=edit)  
[ ranges::starts_with  ](/w/cpp/algorithm/ranges/starts_with "cpp/algorithm/ranges/starts with") (C++23)  |  checks whether a range starts with another range   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_starts_with&action=edit)  
[ ranges::ends_with  ](/w/cpp/algorithm/ranges/ends_with "cpp/algorithm/ranges/ends with") (C++23)  |  checks whether a range ends with another range   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_ends_with&action=edit)  
  
####  [ [ edit ](/mwiki/index.php?title=cpp/algorithm&action=edit&section=6
"Edit section: Fold operations") ]  Fold operations

Defined in header ` [ <algorithm> ](/w/cpp/header/algorithm
"cpp/header/algorithm") `  
---  
[ ranges::fold_left  ](/w/cpp/algorithm/ranges/fold_left "cpp/algorithm/ranges/fold left") (C++23)  |  left-folds a range of elements   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_fold_left&action=edit)  
[ ranges::fold_left_first  ](/w/cpp/algorithm/ranges/fold_left_first "cpp/algorithm/ranges/fold left first") (C++23)  |  left-folds a range of elements using the first element as an initial value   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_fold_left_first&action=edit)  
[ ranges::fold_right  ](/w/cpp/algorithm/ranges/fold_right "cpp/algorithm/ranges/fold right") (C++23)  |  right-folds a range of elements   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_fold_right&action=edit)  
[ ranges::fold_right_last  ](/w/cpp/algorithm/ranges/fold_right_last "cpp/algorithm/ranges/fold right last") (C++23)  |  right-folds a range of elements using the last element as an initial value   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_fold_right_last&action=edit)  
[ ranges::fold_left_with_iter  ](/w/cpp/algorithm/ranges/fold_left_with_iter "cpp/algorithm/ranges/fold left with iter") (C++23)  |  left-folds a range of elements, and returns a [ pair ](/w/cpp/algorithm/ranges/return_types/in_value_result "cpp/algorithm/ranges/return types/in value result") (iterator, value)   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_fold_left_with_iter&action=edit)  
[ ranges::fold_left_first_with_iter  ](/w/cpp/algorithm/ranges/fold_left_first_with_iter "cpp/algorithm/ranges/fold left first with iter") (C++23)  |  left-folds a range of elements using the first element as an initial value, and returns a [ pair ](/w/cpp/algorithm/ranges/return_types/in_value_result "cpp/algorithm/ranges/return types/in value result") (iterator, [ optional ](/w/cpp/utility/optional "cpp/utility/optional") )   
(niebloid)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_fold_left_first_wit