Untitled
Anonymous
plain_text
02/22/2024 10:13 PM
376 B
16
Indexable
bool hasEnding (std::string const &fullString, std::string const &ending) {
if (fullString.length() >= ending.length()) {
return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));
} else {
return false;
}
}Editor is loading...
Leave a Comment