c++ 中的 ends 函数检查字符串的尾部是否与给定的字符串匹配。语法:bool ends(const string& str) const;参数:str - 要匹配的字符串返回值:如果字符串以给定的字符串结尾,则返回 true,否则返回 false。 C++ 中 ends 的含义 en