python中有ends_with函数
C++的呢?
#include"iostream"
using namespace std;
int main(){
string a = "123", b = "3";
cout<<equal(b.rbegin(), b.rend(), a.rbegin());
return 0;
}
python中有ends_with函数
C++的呢?
#include"iostream"
using namespace std;
int main(){
string a = "123", b = "3";
cout<<equal(b.rbegin(), b.rend(), a.rbegin());
return 0;
}