摘要: string s, c; int main() { s = "apple"; c = "l"; int index = s.find(c); if (index != string::npos) cout << index << endl; } find函数会返回找到匹配字符串的第一个位置,如果未找 阅读全文
posted @ 2024-12-05 14:11 _窗帘 阅读(11) 评论(0) 推荐(0)