{"id":987,"date":"2024-12-16T11:58:01","date_gmt":"2024-12-16T11:58:01","guid":{"rendered":"https:\/\/monkey.ploogie.co.uk\/?page_id=987"},"modified":"2024-12-16T12:02:16","modified_gmt":"2024-12-16T12:02:16","slug":"mwnci-rindex-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-rindex-function\/","title":{"rendered":"Mwnci rindex() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>rindex(<i><b>data<\/b><\/i>,<i><b>search<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p>The\u00a0<i>rindex()<\/i>\u00a0function returns the position (indicated as an integer) in\u00a0a string or array\u00a0at which\u00a0search string\u00a0begins, or -1 if\u00a0string\u00a0does not occur in\u00a0the string or array. The first position is 0. Unlike <i>index()<\/i>, this function starts the search from then end of the array or string.<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>a=\"this is a string\" \r\nb=[\"this\", \"is\", \"an\", \"array\"]\r\nprintln(rindex(a, \"str\"))\r\nprintln(rindex(b, \"an\"))\r\n\r\n\r\n10\r\n2\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax rindex(data,search) Description The\u00a0rindex()\u00a0function returns the position (indicated as an integer) in\u00a0a string or array\u00a0at which\u00a0search string\u00a0begins, or -1 if\u00a0string\u00a0does not occur in\u00a0the string or array. The first position is 0. Unlike index(), this function starts the search from then end of the array or string. Example a=&#8221;this is a string&#8221; b=[&#8220;this&#8221;, &#8220;is&#8221;, &#8220;an&#8221;, &#8220;array&#8221;] &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-rindex-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci rindex() Function&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-987","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=987"}],"version-history":[{"count":3,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/987\/revisions"}],"predecessor-version":[{"id":990,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/987\/revisions\/990"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}