Varun

Check if any element in array contains string in C++

This tutorial will discuss about a unique way to check if any element in array contains string in C++. To check any string element in an array contains a sepcific string, we will use the std::any_of() function from STL Algorithms. The std::any_of() function accepts three arguments, The std::any_of() function will apply the given Lambda function

Check if any element in array contains string in C++ Read More »

Check if Any element in Array Starts With a String in C++

This tutorial will discuss about unique ways to check if any element in array starts with string in C++. Table Of Contents Technique 1: Using std::find_if() function Technique 2: Using std::any_of() function Summary Technique 1: Using std::find_if() function Pass the start, and end iterators of array as first two arguments in STL Algorithm std::find_if(). Also,

Check if Any element in Array Starts With a String in C++ Read More »

Check if all elements of Array matches a Condition in C++

This tutorial will discuss about a unique way to check if all elements of an array matches a condition in C++. To check if all elements of an array matches a condition, we will use the std::all_of() function from STL Algorithms. An Intro about std::all_of() function: It accepts three arguments The std::all_of() function will apply

Check if all elements of Array matches a Condition in C++ Read More »

Scroll to Top