added .stringSplit
Posted: Friday 10 May 2019 11:09
Ciao,
I've seen in the new stable that dzVenz added a new function: .stringSplit
the docs explain:will print
1A
2B
3C
4D
?
I'm unable to test it right now, that's why I'm asking this here

I've seen in the new stable that dzVenz added a new function: .stringSplit
the docs explain:
I'm unclear about the result... will it return a table?stringSplit(string, [separator ]):2.4.19 Function. Helper function to split a line in separate words. Default separator is space.
Code: Select all
local myString = "A-B-C-D"
myTable = domoticz.utils.stringSplit(myString,"-")
for idx, val in pairs(myTable) do
domoticz.log(idx..val)
end
1A
2B
3C
4D
?
I'm unable to test it right now, that's why I'm asking this here