ph_split PowerHome formula function
Description
Splits a formatted string that consists of
smaller strings separated by a separator character and places the results into
local
variables.
Syntax
ph_split ( data, sep, local
)
Argument |
Description |
data |
String. The data you would like split. |
sep |
String. The separater character or string. |
local
|
Integer. The starting index of the
local variables to have the split strings
copied into.
|
Return value
Long. Returns the number of strings that
were split.
Usage
Use this function quickly break apart short
strings into individual data. Useful for parsing out data from comma
separated values.
Examples
The following examples demonstrate typical syntax/usage for this function.
ph_split("70.0,69.5,32.8,65.1,Windy",",",3)
The above
example will set [LOCAL3] to 70.0, [LOCAL4] to 69.5, [LOCAL5] to 32.8, [LOCAL6]
to 65.1, and [LOCAL7] to
Windy.