{"id":7172,"date":"2016-03-26T00:56:57","date_gmt":"2016-03-25T15:56:57","guid":{"rendered":"http:\/\/rentan.org\/blog\/?p=7172"},"modified":"2016-03-26T01:56:07","modified_gmt":"2016-03-25T16:56:07","slug":"dmonkey-string-indexof","status":"publish","type":"post","link":"https:\/\/rentan.org\/blog\/2016\/03\/26\/dmonkey-string-indexof\/","title":{"rendered":"DMonkey: 'string'.indexOf('') == -1"},"content":{"rendered":"<pre class=\"prog_code dmonkey\"><code>alert ('foo'.indexOf (''));    \/\/ -1<\/code><\/pre>\n<p>\u7a7a\u6587\u5b57\u5217\u3092\u691c\u7d22\u3059\u308b\u3068 -1 \u304c\u8fd4\u308a\u307e\u3059\u3002<br \/>\n(JavaScript \u3067\u306f 0)<\/p>\n<pre class=\"prog_code dmonkey\"><code>alert ('foo'.indexOf ());    \/\/ undefined<\/code><\/pre>\n<p>\u7279\u306b\u610f\u5473\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u5f15\u6570\u3092\u7701\u7565\u3059\u308b\u3068 <code>undefined<\/code> \u304c\u8fd4\u308a\u307e\u3059\u3002<br \/>\n(JavaScript \u3067\u306f -1)<\/p>\n<p><code>'string'.lastIndexOf ('')<\/code> \u3082\u540c\u69d8\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>alert ('foo'.indexOf ('')); \/\/ -1 \u7a7a\u6587\u5b57\u5217\u3092\u691c\u7d22\u3059\u308b\u3068 -1 \u304c\u8fd4\u308a\u307e\u3059\u3002 (JavaScript \u3067\u306f 0) alert ('foo'.indexOf ()); \/\/ undefine [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[640],"tags":[1191],"class_list":["post-7172","post","type-post","status-publish","format-standard","hentry","category-irvine","tag-dmonkey"],"_links":{"self":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts\/7172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/comments?post=7172"}],"version-history":[{"count":5,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts\/7172\/revisions"}],"predecessor-version":[{"id":7177,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/posts\/7172\/revisions\/7177"}],"wp:attachment":[{"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/media?parent=7172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/categories?post=7172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rentan.org\/blog\/wp-json\/wp\/v2\/tags?post=7172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}