{"id":711,"date":"2011-02-21T20:20:17","date_gmt":"2011-02-22T01:20:17","guid":{"rendered":"http:\/\/anvil-of-time.com\/wordpress\/?p=711"},"modified":"2021-03-10T19:27:51","modified_gmt":"2021-03-11T00:27:51","slug":"powerbuilder-pfc-string-service-extension","status":"publish","type":"post","link":"https:\/\/anvil-of-time.com\/powerbuilder\/powerbuilder-pfc-string-service-extension\/","title":{"rendered":"PowerBuilder &#8211; PFC String service extension"},"content":{"rendered":"<p>Here is a simple modification to the PFC string service (n_cst_string) which will parse out an array of any datatype and returned a delimited string of the contents.  The new method is a polymorph of the existing of_arraytostring.<\/p>\n<pre name=\"code\" class=\"VB\">public function long of_arraytostring (any aa_array[], string as_delimiter, ref string as_string)\n\n\/\/ convert array to string array and then send to standard PFC function\nlong ll_ac, ll_i\nstring ls_array[], ls_format\n\nll_ac = Upperbound(aa_array)\nFOR ll_i = 1 to ll_ac\n\tIF ls_format = &#039;&#039; THEN\n\t\tCHOOSE CASE Classname(aa_array[ll_i])\n\t\t\tCASE &quot;string&quot;,&quot;char&quot;\n\t\t\tCASE &quot;datetime&quot;\n\t\t\t\tls_format = &#039;mm-dd-yyyy hh:mm:ss&#039;\n\t\t\tCASE &quot;date&quot;\n\t\t\t\tls_format = &#039;mm-dd-yyyy&#039;\n\t\t\tCASE &quot;time&quot;\n\t\t\t\tls_format = &#039;hh:mm:ss&#039;\n\t\t\tCASE ELSE\n\t\t\t\t\n\t\tEND CHOOSE\n\tEND IF\n\tls_array[ll_i] = string(aa_array[ll_i], ls_format)\nNEXT\n\nRETURN of_arraytostring(ls_array,as_delimiter,as_string)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here is a simple modification to the PFC string service (n_cst_string) which will parse out an array of any datatype and returned a delimited string of the contents. The new method is a polymorph of the existing of_arraytostring. public function long of_arraytostring (any aa_array[], string as_delimiter, ref string as_string) \/\/ convert array to string array&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,10],"tags":[33,12,16],"_links":{"self":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/711"}],"collection":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/comments?post=711"}],"version-history":[{"count":5,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/711\/revisions"}],"predecessor-version":[{"id":1928,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/711\/revisions\/1928"}],"wp:attachment":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/media?parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/categories?post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/tags?post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}