示例#1
0
// returns whether string ends with pattern
bool endsWith(ECString str, ECString pattern) {
    int index = str.rfind(pattern);
    return index == ((signed int)str.size() - (signed int)pattern.size());
}