Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
281 B
1
Indexable
Never
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;
    }
}
Leave a Comment