array_setstring()

Set string data to array.

If new data is set at the end of array, data is appended, otherwise it is overwritten.

Syntax

array_setstring(hnd, str);
array_setstring(hnd, str, pos);

Parameters

hnd Array handle.
str String data.
pos Data position. (optional)
Return Value Returns array size. Returned value is integer number.

Example

hnd = array_new();
array_setstring(hnd, "PlanetCNC");
result = array_printstring(hnd);
array_delete(hnd);

result:

9; PlanetCNC

See also

array_new, array_delete, array_printstring