#beginwith

C++ 实现beginwith()和endwith()

#include<iostream>#include<string>usingnamespacestd;intendswith(strings,stringsub){if(s.rfind(sub)==-1){//排除出现类似s:23sub:123的情况.return0;}else{returns...
开发笔记 ·2021-03-27