{"id":89,"date":"2021-09-17T15:23:44","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/swift.tecc0.com\/?p=89"},"modified":"2021-09-17T15:23:44","modified_gmt":"1970-01-01T00:00:00","slug":"post-89","status":"publish","type":"post","link":"https:\/\/swift.tecc0.com\/?p=89","title":{"rendered":"\u5bfe\u51e6\u6cd5: count is unavailable: access the count property on the collection. Type String doesn&#8217;t conform to protocol CollectionType [Swift2.2]"},"content":{"rendered":"<p>Swift2.0\u306b\u3057\u305f\u3089\u51fa\u305f\u30a8\u30e9\u30fc\u3002<\/p>\n<p>Swift2.0\u3067\u6587\u5b57\u5217\u306e\u9577\u3055\u3092\u51fa\u3059\u306b\u306f\u3001\u66f8\u304d\u65b9\u304c\u5909\u308f\u3063\u3066\u308b\u3088\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline; color: #ff0000;\">\u51fa\u305f\u30a8\u30e9\u30fc<\/span><\/p>\n<p><strong><code>count<\/code>\u00a0is unavailable: access the\u00a0<code>count<\/code>\u00a0property on the collection. Type\u00a0<code>String<\/code>\u00a0doesn&#8217;t conform to protocol\u00a0<code>CollectionType<\/code><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3>Swift1.2\u307e\u3067<\/h3>\n<pre class=\"toolbar-overlay:false lang:swift decode:true \">count(str)<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3>Swift2.0\u304b\u3089<\/h3>\n<pre class=\"toolbar-overlay:false lang:swift decode:true \">str.characters.count<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u308c\u3067\u304ak<\/p>\n<p>&nbsp;<\/p>\n<p>\u53c2\u8003:\u00a0<a class=\"question-hyperlink\" href=\"https:\/\/stackoverflow.com\/questions\/31069069\/how-can-i-get-the-length-of-a-string-in-swift-2-0\">How can I get the length of a String in Swift 2.0?<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Swift2.0\u306b\u3057\u305f\u3089\u51fa\u305f\u30a8\u30e9\u30fc\u3002 Swift2.0\u3067\u6587\u5b57\u5217\u306e\u9577\u3055\u3092\u51fa\u3059\u306b\u306f\u3001\u66f8\u304d\u65b9\u304c\u5909\u308f\u3063\u3066\u308b\u3088\u3002 &nbsp; \u51fa\u305f\u30a8\u30e9\u30fc count\u00a0is unavailable: access the\u00a0count\u00a0proper&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/89"}],"collection":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=89"}],"version-history":[{"count":3,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}