移动匹配方法中用到: if(t.find(s)!=std::string::npos) return true; 代码随想录 其中,std::string::npos的含义:如果字符串中不存在包含关系,则返回值一定为固定参数npos。 (3条消息) string::npos的含义_人类高质量算法工程师的博客-优快云博客