Split strings using a delimiter

Added by iNTERFACEWARE

Use the string.split() function to split a string into parts separated by a specified delimiter

Source Code
   -- split the message into individual lines "\r" separator
   local r = msg:split('\\r')
   trace(r) 

   -- allow for the \n added because we split the msg declaration over multiple lines (above)
   local r = msg:split('\\r\n')
   trace(r) 

   -- split the message into fields "|" separator
   local r = msg:split('|')
   trace(r)
Description
Use the string.split() function to split a string into parts separated by a specified delimiter