Array.arrayify()
 
   
[Top]
predef::
Array

Method Array.arrayify()


Method arrayify

array Array.arrayify(void|array|mixed x)

Description

Make an array of the argument, if it isn't already. A zero_type argument gives the empty array. This is useful when something is either an array or a basic datatype, for instance in headers from the MIME module or Protocols.HTTP.Server.

Parameter x

Result depends of the argument type:

arrayp(x)

arrayify(x) => x

zero_type(x)

arrayify(x) => ({})

otherwise

arrayify(x) => ({ x })


Insert any HTML comment here. You can use any HTML tags and containers. Use <phl> ... </phl> if you'd like to insert some Pike / C examples or code.
 
HTML OK CSS