Aller au contenu principal

join

Join element of an array.

JOIN

NAME

join - Join element of an array.

SYNOPSIS

join(array, expression)

DESCRIPTION

This function is used to join elements of an arry as a string.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

res={_{
       arr = [ 1, 2 , "pierre", 2.5 ];
       arr.join(" - ");
     }}.return res=1 - 2 - pierre - 2.5.

res={_{
       arr = [  ];
       arr.join(" - ");
    }}. return res=.

res={_{
       arr = [ 1, { "x" : 2 }, 3 ];
       arr.join(" - ");
    }}. return res=1 - {"x":2} - 3.

SEE ALSO

{{ include("includes/array.sn") }}

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.