{"id":31,"date":"2014-06-18T21:49:06","date_gmt":"2014-06-18T12:49:06","guid":{"rendered":"https:\/\/www.dogrow.net\/python\/?p=31"},"modified":"2019-10-19T06:04:46","modified_gmt":"2019-10-18T21:04:46","slug":"blog9","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/python\/blog9\/","title":{"rendered":"(9) \u6587\u5b57\u5217\u4e2d\u306e\u4efb\u610f\u306e\u6587\u5b57\u5217\u3092\u691c\u7d22"},"content":{"rendered":"<p>\u6587\u5b57\u5217\u30af\u30e9\u30b9\u306e <span class=\"my_fc_deeppinkBBig\">find<\/span> \u30e1\u30bd\u30c3\u30c9\u3067\u4efb\u610f\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u691c\u7d22\u3059\u308b\u3002<\/p>\n<p>\u691c\u51fa\u3055\u308c\u305f\u5834\u5408\u3001\u623b\u308a\u5024\u3068\u3057\u3066\u691c\u51fa\u4f4d\u7f6e\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8fd4\u3055\u308c\u308b\u3002<\/p>\n<pre>\r\n&gt;&gt;&gt; str = 'aabbccddccbbaa'\r\n&gt;&gt;&gt; str.<span class=\"my_fc_deeppinkB\">find<\/span>('aa')\r\n0\r\n&gt;&gt;&gt; str.<span class=\"my_fc_deeppinkB\">find<\/span>('bb')\r\n2\r\n&gt;&gt;&gt; str.<span class=\"my_fc_deeppinkB\">find<\/span>('bbaa')\r\n10\r\n<\/pre>\n<p>\u691c\u51fa\u3067\u304d\u306a\u304b\u3063\u305f\u5834\u5408\u3001\u623b\u308a\u5024\u3068\u3057\u3066 <span class=\"my_fc_deeppinkBBig\">-1<\/span> \u304c\u8fd4\u3055\u308c\u308b\u3002<\/p>\n<pre>\r\n&gt;&gt;&gt; str.find('xx')\r\n-1\r\n<\/pre>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u5b57\u5217\u30af\u30e9\u30b9\u306e find \u30e1\u30bd\u30c3\u30c9\u3067\u4efb\u610f\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u691c\u7d22\u3059\u308b\u3002 \u691c\u51fa\u3055\u308c\u305f\u5834\u5408\u3001\u623b\u308a\u5024\u3068\u3057\u3066\u691c\u51fa\u4f4d\u7f6e\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8fd4\u3055\u308c\u308b\u3002 &gt;&gt;&gt; str = &#8216;aabbccddccbbaa&#8217; &gt;&gt;&#038;g\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/python\/blog9\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-2"],"views":1933,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":8,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":2582,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/31\/revisions\/2582"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}