{"width":"100%","url":"https://toburau.hatenablog.jp/entry/20090501/1241188257","blog_url":"https://toburau.hatenablog.jp/","version":"1.0","height":"190","title":"string\u306efind,rfind","blog_title":"\u30b2\u30fc\u30e0\u304c\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u304c\u3093\u3070\u308b\u65e5\u8a18","description":"string\u306e\u30e1\u30f3\u30d0\u95a2\u6570find(),rfind()\u306f\u6587\u5b57\u5217\u3092\u691c\u7d22\u3059\u308b\u3082\u306e\u3002 find()\u306f\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u304c\u6700\u521d\u306b\u3042\u3089\u308f\u308c\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f4d\u7f6e\u3092\u8fd4\u3057\u3001rfind()\u306f\u9006\u306b\u6700\u5f8c\u306b\u3042\u3089\u308f\u308c\u305f\u4f4d\u7f6e\u3092\u8fd4\u3059\u3002 \u305d\u3057\u3066\u3001\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u6642\u306b\u306f npos \u3092\u8fd4\u3059\u3002 #include <iostream> #include <string> using namespace std; int main() { string str1(\"This is a test. This is a test2.\"); int i = str1.find(\"test\"); cout << i << endl; i \u2026","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoburau.hatenablog.jp%2Fentry%2F20090501%2F1241188257\" title=\"string\u306efind,rfind - \u30b2\u30fc\u30e0\u304c\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u304c\u3093\u3070\u308b\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","author_name":"toburau","image_url":null,"categories":["C++"],"published":"2009-05-01 23:30:57","author_url":"https://blog.hatena.ne.jp/toburau/","type":"rich"}