stringfind
时间: 2023-09-27 15:05:43 浏览: 195
深入C++ string.find()函数的用法总结
在C++中,string类提供了几个用于查找子字符串或字符的方法。其中包括find(),rfind(),find_first_of(),find_last_of(),find_first_not_of()和find_last_not_of()等方法。这些方法可以在字符串中搜索指定的子字符串或字符,并返回第一个匹配的位置。如果找不到匹配的位置,这些方法会返回string::npos。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [string类的find()函数总结](https://blog.csdn.net/shujh_sysu/article/details/52026108)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [string的find( )函数✅](https://blog.csdn.net/weixin_45884316/article/details/108235945)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文