Invert GMLscripts.com

implode_real

Returns a string of elements from a given array of real values and separated by a delimiter.

array[0] = 10;
array[1] = 21;
array[2] = 13;
array[3] = 3;
array[4] = 18;
array[5] = 15;

numbers = implode(",", array);

//  numbers == "10,21,13,3,18,15"
implode_real(delimiter,array)
Returns a string of elements from a given array of real values and separated by a delimiter.
COPY/// implode_real(delimiter,array)
//
//  Returns a string of elements from a given array
//  of real values and separated by a delimiter.
//
//      delimiter   delimiter character, string
//      array       group of elements, array
//
/// GMLscripts.com/license
{
    var del = argument0;
    var arr = argument1;
    var out = "";
    var ind = 0;
    var num = array_length_1d(arr);
    repeat (num-1) {
        out += string(arr[ind]) + del;
        ind++;
    }
    out += string(arr[ind]);
    return out;
}

Contributors: xot

GitHub: View · Commits · Blame · Raw