{"id":284,"date":"2024-10-03T08:33:43","date_gmt":"2024-10-03T07:33:43","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=284"},"modified":"2024-10-03T08:36:45","modified_gmt":"2024-10-03T07:36:45","slug":"mwnci-len-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-len-function\/","title":{"rendered":"Mwnci len() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>len(<i><b>variable<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p>The <i>len()<\/i> function returns the length of the <i>variable<\/i>. The variable can be one of <i>string<\/i>, <i>array<\/i>, or <i>hash<\/i>.<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>a=\"1234\"\r\nb=[1,2,3,4,5]\r\nc={\"foo\": 1, \"wib\": \"ble\"}\r\nprintln(len(a), \" \",len(b), \" \", len(c))\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax len(variable) Description The len() function returns the length of the variable. The variable can be one of string, array, or hash. Example a=&#8221;1234&#8243; b=[1,2,3,4,5] c={&#8220;foo&#8221;: 1, &#8220;wib&#8221;: &#8220;ble&#8221;} println(len(a), &#8221; &#8220;,len(b), &#8221; &#8220;, len(c))<\/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-284","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/284","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=284"}],"version-history":[{"count":1,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/284\/revisions"}],"predecessor-version":[{"id":285,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/284\/revisions\/285"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}