Horje
c++ check that const char* has suffix Code Example
c++ check that const char* has suffix
#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));




Cpp

Related
read a whole line from the input Code Example read a whole line from the input Code Example
how to concatenate two vectors in c++ Code Example how to concatenate two vectors in c++ Code Example
union cpp Code Example union cpp Code Example
inverser les éléments d'un tableau manuellement en c++ Code Example inverser les éléments d'un tableau manuellement en c++ Code Example
How to get cursor position c++ Code Example How to get cursor position c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9