String to Array

 
 
 

Categories

Description

Builds an array of values given an input string formatted as a comma or whitespace-separated list of values. The output array type is inferred at connection-time from the output port type.

For complex data types like vectors, matrices, and quaternions, the number of items in the input must be an exact multiple of the data type's size. For example, for 2D vectors the input must contain groups of 2 scalars, for 3x3 matrices the input must contain groups of 9 scalars, for quaternions the input must contain groups of 4 scalars, and son on.

For integers, you can also use a range syntax.

String Result
1,2,3-5,6 1 2 3 4 5 6
-3-1 2-4 7-5 8-10 -1 -3 -2 -1 0 1 2 3 4 7 6 5 8 9 10 -1
-3--1 -5--3 -3 -2 -1 -5 -4 -3

Ports

Inputs

Value

A string of comma or whitespace-separated values.

Outputs

Result

An array.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License