StringToArray_v2 Op

StringToArray

Parse a string into an array (create, split string, stringToArray)


<p>Let’s you enter multiple values as an array in the editor. The result can then be used by e.g. <a href="/op/Ops.Array.ArrayGetValue">Ops.Array.ArrayGetValue</a>.</p>


Full Name
  • Ops.Array.StringToArray_v2
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorgithubTest Patches


Example Patch Array Sum

Open In Editor

Youtube Video Tutorial

INPUT PORTS


text (String)

<p>The array-data you want to use, e.g. <code>100,200,300</code></p>

separator (String)

<p>The separator to use, e.g. <code>,</code> (comma) when your text is <code>foo,bar,baz</code></p>

Numbers (Number:

<i>boolean</i>

)

<p>If set, the values inside the array will be interpreted as numbers (not strings)</p>

Trim (Number:

<i>boolean</i>

)

Split Lines (Number:

<i>boolean</i>

)

OUTPUT PORTS


array (Array)

<p>The parsed array</p>

Parsed (Trigger)

<p>Triggers once the array has been parsed</p>

length (Number)

<p>The number of elements in the resulting array</p>


Patches using StringToArray_v2

  • Examples
  • Public
  • My Patches

Changelog


enhancement: ignore comma after last valueuser avatarpandur - 2019-08-26 11:57
renameOps.Array.ParseArray_v2 renamed to Ops.Array.StringToArray_v2user avatarpandur - 2023-06-05 12:01