#include <boost/algorithm/string/predicate.hpp>
// works with const char*
assert(boost::algorithm::ends_with("mystring", "ing"));
// also works with std::string
std::string haystack("mystring");
std::string needle("ing");
assert(boost::algorithm::ends_with(haystack, needle));
std::string haystack2("ng");
assert(! boost::algorithm::ends_with(haystack2, needle));
Code Example |
---|
Cpp :: creating node in c++ |
Cpp :: find vector size in c++ |
Cpp :: iterate const vector |
Cpp :: opencv compile c++ |
Cpp :: C++ String Concatenation Example |
Cpp :: intersection between vector c++ |
Cpp :: call function from separate bash script |
Cpp :: cout stack in c++ |
Cpp :: log base e synthax c++ |
Cpp :: iomanip header file in c++ |
Cpp :: c++ for loop syntax |
Cpp :: remove whitespace in cpp |
Cpp :: cast cpp |
Cpp :: time complexity |
Cpp :: right shift in c++ |
Cpp :: c++ define function pointer |
Cpp :: array of charcter c++ |
Cpp :: memset function in c++ |
Cpp :: even and odd numbers 1 to 100 |
Cpp :: char at in c++ |
Cpp :: problem category codechef solution in c++ |
Cpp :: codeforces problem 1030A solution |
Cpp :: c++ calling variable constructor |
Cpp :: CPP print executable name |
Cpp :: *= c++ |
Cpp :: sfml disable message |
Cpp :: get range sum |
Cpp :: how to make a defaule conrstrocr in c++ classes |
Cpp :: private access specifier in c++ program |
Cpp :: comentar todas linhas de uma vez vs code |